Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/css/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/css/com_content.zip

PK���[�`&?��js/admin-article-pagebreak.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */
(function() {
	"use strict";

	window.insertPagebreak = function(editor) {
		/** Get the pagebreak title **/
		var alt, tag, title = document.getElementById('title').value;

		if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
			// Something went wrong!
			window.parent.jModalClose();
			return false;
		}

		/** Get the pagebreak toc alias -- not inserting for now **/
		/** don't know which attribute to use... **/
		alt = document.getElementById('alt').value;

		title  = (title != '') ? 'title="' + title +
'"' : '';
		alt    = (alt != '') ? 'alt="' + alt +
'"' : '';

		tag = '<hr class="system-pagebreak" ' + title +
' ' + alt + '/>';

		/** Use the API, if editor supports it **/
		if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
		} else {
			window.parent.jInsertEditorText(tag, editor);
		}

		window.parent.jModalClose();
		return false;
	};
})();
PK���[�h�mmm!js/admin-article-pagebreak.min.jsnu�[���!function(){"use
strict";window.insertPagebreak=function(a){var
b,c,d=document.getElementById("title").value;return
window.parent.Joomla.getOptions("xtd-pagebreak")?(b=document.getElementById("alt").value,d=""!=d?'title="'+d+'"':"",b=""!=b?'alt="'+b+'"':"",c='<hr
class="system-pagebreak" '+d+"
"+b+"/>",window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(a)?window.parent.Joomla.editors.instances[a].replaceSelection(c):window.parent.jInsertEditorText(c,a),window.parent.jModalClose(),!1):(window.parent.jModalClose(),!1)}}();PK���[lWV���js/admin-article-readmore.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

window.insertReadmore = function(editor) {
	"use strict";
	if (!Joomla.getOptions('xtd-readmore')) {
		// Something went wrong!
		return false;
	}

	var content, options = window.Joomla.getOptions('xtd-readmore');

	if (window.Joomla && window.Joomla.editors &&
window.Joomla.editors.instances &&
window.Joomla.editors.instances.hasOwnProperty(editor)) {
		content = window.Joomla.editors.instances[editor].getValue();
	} else {
		content = (new Function('return ' + options.editor))();
	}

	if
(content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i))
{
		alert(options.exists);
		return false;
	} else {
		/** Use the API, if editor supports it **/
		if (window.Joomla && window.Joomla.editors &&
window.Joomla.editors.instances &&
window.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.Joomla.editors.instances[editor].replaceSelection('<hr
id="system-readmore" />');
		} else {
			window.jInsertEditorText('<hr id="system-readmore"
/>', editor);
		}
	}
};
PK���[_(zZ��
js/admin-article-readmore.min.jsnu�[���window.insertReadmore=function(a){"use
strict";if(!Joomla.getOptions("xtd-readmore"))return!1;var
b,c=window.Joomla.getOptions("xtd-readmore");if(b=window.Joomla&&window.Joomla.editors&&window.Joomla.editors.instances&&window.Joomla.editors.instances.hasOwnProperty(a)?window.Joomla.editors.instances[a].getValue():new
Function("return
"+c.editor)(),b.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i))return
alert(c.exists),!1;window.Joomla&&window.Joomla.editors&&window.Joomla.editors.instances&&window.Joomla.editors.instances.hasOwnProperty(a)?window.Joomla.editors.instances[a].replaceSelection('<hr
id="system-readmore"
/>'):window.jInsertEditorText('<hr
id="system-readmore"
/>',a)};PK���[��H��js/admin-articles-modal.jsnu�[���/**
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */
(function() {
	"use strict";
	/**
	 * Javascript to insert the link
	 * View element calls jSelectArticle when an article is clicked
	 * jSelectArticle creates the link tag, sends it to the editor,
	 * and closes the select frame.
	 **/
	window.jSelectArticle = function (id, title, catid, object, link, lang) {
		var hreflang = '', editor, tag;

		if (!Joomla.getOptions('xtd-articles')) {
			// Something went wrong!
			window.parent.jModalClose();
			return false;
		}

		editor = Joomla.getOptions('xtd-articles').editor;

		if (lang !== '')
		{
			hreflang = ' hreflang="' + lang + '"';
		}

		tag = '<a' + hreflang + ' href="' + link +
'">' + title + '</a>';

		/** Use the API, if editor supports it **/
		if (window.parent.Joomla && window.parent.Joomla.editors
&& window.parent.Joomla.editors.instances &&
window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
		} else {
			window.parent.jInsertEditorText(tag, editor);
		}

		window.parent.jModalClose();
	};

	document.addEventListener('DOMContentLoaded', function(){
		// Get the elements
		var elements = document.querySelectorAll('.select-link');

		for(var i = 0, l = elements.length; l>i; i++) {
			// Listen for click event
			elements[i].addEventListener('click', function (event) {
				event.preventDefault();
				var functionName =
event.target.getAttribute('data-function');

				if (functionName === 'jSelectArticle') {
					// Used in xtd_contacts
					window[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'),
event.target.getAttribute('data-cat-id'), null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'));
				} else {
					// Used in com_menus
					window.parent[functionName](event.target.getAttribute('data-id'),
event.target.getAttribute('data-title'),
event.target.getAttribute('data-cat-id'), null,
event.target.getAttribute('data-uri'),
event.target.getAttribute('data-language'));
				}
			})
		}
	});
})();
PK���[����js/admin-articles-modal.min.jsnu�[���!function(){"use
strict";window.jSelectArticle=function(a,b,c,d,e,f){var
h,i,g="";return
Joomla.getOptions("xtd-articles")?(h=Joomla.getOptions("xtd-articles").editor,""!==f&&(g='
hreflang="'+f+'"'),i="<a"+g+'
href="'+e+'">'+b+"</a>",window.parent.Joomla&&window.parent.Joomla.editors&&window.parent.Joomla.editors.instances&&window.parent.Joomla.editors.instances.hasOwnProperty(h)?window.parent.Joomla.editors.instances[h].replaceSelection(i):window.parent.jInsertEditorText(i,h),void
window.parent.jModalClose()):(window.parent.jModalClose(),!1)},document.addEventListener("DOMContentLoaded",function(){for(var
a=document.querySelectorAll(".select-link"),b=0,c=a.length;c>b;b++)a[b].addEventListener("click",function(a){a.preventDefault();var
b=a.target.getAttribute("data-function");"jSelectArticle"===b?window[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),a.target.getAttribute("data-cat-id"),null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language")):window.parent[b](a.target.getAttribute("data-id"),a.target.getAttribute("data-title"),a.target.getAttribute("data-cat-id"),null,a.target.getAttribute("data-uri"),a.target.getAttribute("data-language"))})})}();PK��[Y�I�mmcontent.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContentHelperRoute', JPATH_SITE .
'/components/com_content/helpers/route.php');
JLoader::register('ContentHelperQuery', JPATH_SITE .
'/components/com_content/helpers/query.php');
JLoader::register('ContentHelperAssociation', JPATH_SITE .
'/components/com_content/helpers/association.php');

$input = JFactory::getApplication()->input;
$user  = JFactory::getUser();

$checkCreateEdit = ($input->get('view') ===
'articles' && $input->get('layout') ===
'modal')
	|| ($input->get('view') === 'article' &&
$input->get('layout') === 'pagebreak');

if ($checkCreateEdit)
{
	// Can create in any category (component permission) or at least in one
category
	$canCreateRecords = $user->authorise('core.create',
'com_content')
		|| count($user->getAuthorisedCategories('com_content',
'core.create')) > 0;

	// Instead of checking edit on all records, we can use **same** check as
the form editing view
	$values = (array)
JFactory::getApplication()->getUserState('com_content.edit.article.id');
	$isEditingRecords = count($values);

	$hasAccess = $canCreateRecords || $isEditingRecords;

	if (!$hasAccess)
	{
		JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'warning');

		return;
	}
}

$controller = JControllerLegacy::getInstance('Content');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
PK��[���

controller.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;

/**
 * Content Component Controller
 *
 * @since  1.5
 */
class ContentController extends JControllerLegacy
{
	/**
	 * Constructor.
	 *
	 * @param   array  $config  An optional associative array of configuration
settings.
	 * Recognized key values include 'name',
'default_task', 'model_path', and
	 * 'view_path' (this list is not meant to be comprehensive).
	 *
	 * @since   3.0.1
	 */
	public function __construct($config = array())
	{
		$this->input = JFactory::getApplication()->input;

		// Article frontpage Editor pagebreak proxying:
		if ($this->input->get('view') === 'article'
&& $this->input->get('layout') ===
'pagebreak')
		{
			$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
		}
		// Article frontpage Editor article proxying:
		elseif ($this->input->get('view') ===
'articles' && $this->input->get('layout')
=== 'modal')
		{
			JHtml::_('stylesheet', 'system/adminlist.css',
array('version' => 'auto', 'relative'
=> true));
			$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
		}

		parent::__construct($config);
	}

	/**
	 * Method to display a view.
	 *
	 * @param   boolean  $cachable   If true, the view output will be cached.
	 * @param   boolean  $urlparams  An array of safe URL parameters and their
variable types, for valid values see {@link JFilterInput::clean()}.
	 *
	 * @return  JController  This object to support chaining.
	 *
	 * @since   1.5
	 */
	public function display($cachable = false, $urlparams = false)
	{
		$cachable = true;

		/**
		 * Set the default view name and format from the Request.
		 * Note we are using a_id to avoid collisions with the router and the
return page.
		 * Frontend is a bit messier than the backend.
		 */
		$id    = $this->input->getInt('a_id');
		$vName = $this->input->getCmd('view',
'categories');
		$this->input->set('view', $vName);

		$user = JFactory::getUser();

		if ($user->get('id')
			|| ($this->input->getMethod() === 'POST'
			&& (($vName === 'category' &&
$this->input->get('layout') !== 'blog') || $vName
=== 'archive' )))
		{
			$cachable = false;
		}

		$safeurlparams = array(
			'catid' => 'INT',
			'id' => 'INT',
			'cid' => 'ARRAY',
			'year' => 'INT',
			'month' => 'INT',
			'limit' => 'UINT',
			'limitstart' => 'UINT',
			'showall' => 'INT',
			'return' => 'BASE64',
			'filter' => 'STRING',
			'filter_order' => 'CMD',
			'filter_order_Dir' => 'CMD',
			'filter-search' => 'STRING',
			'print' => 'BOOLEAN',
			'lang' => 'CMD',
			'Itemid' => 'INT');

		// Check for edit form.
		if ($vName === 'form' &&
!$this->checkEditId('com_content.edit.article', $id))
		{
			// Somehow the person just went to the form - we don't allow that.
			return JError::raiseError(403,
JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
		}

		if ($vName === 'article')
		{
			// Get/Create the model
			if ($model = $this->getModel($vName))
			{
				if
(ComponentHelper::getParams('com_content')->get('record_hits',
1) == 1)
				{
					$model->hit();
				}
			}
		}

		parent::display($cachable, $safeurlparams);

		return $this;
	}
}
PK��[��w�Z'Z'controllers/article.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

/**
 * Content article class.
 *
 * @since  1.6.0
 */
class ContentControllerArticle extends JControllerForm
{
	/**
	 * The URL view item variable.
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $view_item = 'form';

	/**
	 * The URL view list variable.
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $view_list = 'categories';

	/**
	 * The URL edit variable.
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $urlVar = 'a.id';

	/**
	 * Method to add a new record.
	 *
	 * @return  mixed  True if the record can be added, an error object if
not.
	 *
	 * @since   1.6
	 */
	public function add()
	{
		if (!parent::add())
		{
			// Redirect to the return page.
			$this->setRedirect($this->getReturnPage());

			return;
		}

		// Redirect to the edit screen.
		$this->setRedirect(
			JRoute::_(
				'index.php?option=' . $this->option .
'&view=' . $this->view_item . '&a_id=0'
				. $this->getRedirectToItemAppend(), false
			)
		);

		return true;
	}

	/**
	 * Method override to check if you can add a new record.
	 *
	 * @param   array  $data  An array of input data.
	 *
	 * @return  boolean
	 *
	 * @since   1.6
	 */
	protected function allowAdd($data = array())
	{
		$user       = JFactory::getUser();
		$categoryId = ArrayHelper::getValue($data, 'catid',
$this->input->getInt('catid'), 'int');
		$allow      = null;

		if ($categoryId)
		{
			// If the category has been passed in the data or URL check it.
			$allow = $user->authorise('core.create',
'com_content.category.' . $categoryId);
		}

		if ($allow === null)
		{
			// In the absence of better information, revert to the component
permissions.
			return parent::allowAdd();
		}
		else
		{
			return $allow;
		}
	}

	/**
	 * Method override to check if you can edit an existing record.
	 *
	 * @param   array   $data  An array of input data.
	 * @param   string  $key   The name of the key for the primary key;
default is id.
	 *
	 * @return  boolean
	 *
	 * @since   1.6
	 */
	protected function allowEdit($data = array(), $key = 'id')
	{
		$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
		$user = JFactory::getUser();

		// Zero record (id:0), return component edit permission by calling parent
controller method
		if (!$recordId)
		{
			return parent::allowEdit($data, $key);
		}

		// Check edit on the record asset (explicit or inherited)
		if ($user->authorise('core.edit',
'com_content.article.' . $recordId))
		{
			return true;
		}

		// Check edit own on the record asset (explicit or inherited)
		if ($user->authorise('core.edit.own',
'com_content.article.' . $recordId))
		{
			// Existing record already has an owner, get it
			$record = $this->getModel()->getItem($recordId);

			if (empty($record))
			{
				return false;
			}

			// Grant if current user is owner of the record
			return $user->get('id') == $record->created_by;
		}

		return false;
	}

	/**
	 * Method to cancel an edit.
	 *
	 * @param   string  $key  The name of the primary key of the URL variable.
	 *
	 * @return  boolean  True if access level checks pass, false otherwise.
	 *
	 * @since   1.6
	 */
	public function cancel($key = 'a_id')
	{
		parent::cancel($key);

		$app = JFactory::getApplication();

		// Load the parameters.
		$params = $app->getParams();

		$customCancelRedir = (bool)
$params->get('custom_cancel_redirect');

		if ($customCancelRedir)
		{
			$cancelMenuitemId = (int)
$params->get('cancel_redirect_menuitem');

			if ($cancelMenuitemId > 0)
			{
				$item = $app->getMenu()->getItem($cancelMenuitemId);
				$lang = '';

				if (JLanguageMultilang::isEnabled())
				{
					$lang = !is_null($item) && $item->language != '*'
? '&lang=' . $item->language : '';
				}

				// Redirect to the user specified return page.
				$redirlink = $item->link . $lang . '&Itemid=' .
$cancelMenuitemId;
			}
			else
			{
				// Redirect to the same article submission form (clean form).
				$redirlink = $app->getMenu()->getActive()->link .
'&Itemid=' . $app->getMenu()->getActive()->id;
			}
		}
		else
		{
			$menuitemId = (int) $params->get('redirect_menuitem');
			$lang = '';

			if ($menuitemId > 0)
			{
				$lang = '';
				$item = $app->getMenu()->getItem($menuitemId);

				if (JLanguageMultilang::isEnabled())
				{
					$lang = !is_null($item) && $item->language != '*'
? '&lang=' . $item->language : '';
				}

				// Redirect to the general (redirect_menuitem) user specified return
page.
				$redirlink = $item->link . $lang . '&Itemid=' .
$menuitemId;
			}
			else
			{
				// Redirect to the return page.
				$redirlink = $this->getReturnPage();
			}
		}

		$this->setRedirect(JRoute::_($redirlink, false));
	}

	/**
	 * Method to edit an existing record.
	 *
	 * @param   string  $key     The name of the primary key of the URL
variable.
	 * @param   string  $urlVar  The name of the URL variable if different
from the primary key
	 * (sometimes required to avoid router collisions).
	 *
	 * @return  boolean  True if access level check and checkout passes, false
otherwise.
	 *
	 * @since   1.6
	 */
	public function edit($key = null, $urlVar = 'a_id')
	{
		$result = parent::edit($key, $urlVar);

		if (!$result)
		{
			$this->setRedirect(JRoute::_($this->getReturnPage(), false));
		}

		return $result;
	}

	/**
	 * Method to get a model object, loading it if required.
	 *
	 * @param   string  $name    The model name. Optional.
	 * @param   string  $prefix  The class prefix. Optional.
	 * @param   array   $config  Configuration array for model. Optional.
	 *
	 * @return  object  The model.
	 *
	 * @since   1.5
	 */
	public function getModel($name = 'form', $prefix = '',
$config = array('ignore_request' => true))
	{
		return parent::getModel($name, $prefix, $config);
	}

	/**
	 * Gets the URL arguments to append to an item redirect.
	 *
	 * @param   integer  $recordId  The primary key id for the item.
	 * @param   string   $urlVar    The name of the URL variable for the id.
	 *
	 * @return  string	The arguments to append to the redirect URL.
	 *
	 * @since   1.6
	 */
	protected function getRedirectToItemAppend($recordId = null, $urlVar =
'a_id')
	{
		// Need to override the parent method completely.
		$tmpl   = $this->input->get('tmpl');

		$append = '';

		// Setup redirect info.
		if ($tmpl)
		{
			$append .= '&tmpl=' . $tmpl;
		}

		// TODO This is a bandaid, not a long term solution.
		/**
		 * if ($layout)
		 * {
		 *	$append .= '&layout=' . $layout;
		 * }
		 */

		$append .= '&layout=edit';

		if ($recordId)
		{
			$append .= '&' . $urlVar . '=' . $recordId;
		}

		$itemId = $this->input->getInt('Itemid');
		$return = $this->getReturnPage();
		$catId  = $this->input->getInt('catid');

		if ($itemId)
		{
			$append .= '&Itemid=' . $itemId;
		}

		if ($catId)
		{
			$append .= '&catid=' . $catId;
		}

		if ($return)
		{
			$append .= '&return=' . base64_encode($return);
		}

		return $append;
	}

	/**
	 * Get the return URL.
	 *
	 * If a "return" variable has been passed in the request
	 *
	 * @return  string	The return URL.
	 *
	 * @since   1.6
	 */
	protected function getReturnPage()
	{
		$return = $this->input->get('return', null,
'base64');

		if (empty($return) || !JUri::isInternal(base64_decode($return)))
		{
			return JUri::base();
		}
		else
		{
			return base64_decode($return);
		}
	}

	/**
	 * Method to save a record.
	 *
	 * @param   string  $key     The name of the primary key of the URL
variable.
	 * @param   string  $urlVar  The name of the URL variable if different
from the primary key (sometimes required to avoid router collisions).
	 *
	 * @return  boolean  True if successful, false otherwise.
	 *
	 * @since   1.6
	 */
	public function save($key = null, $urlVar = 'a_id')
	{
		$result    = parent::save($key, $urlVar);
		$app       = JFactory::getApplication();
		$articleId = $app->input->getInt('a_id');

		// Load the parameters.
		$params   = $app->getParams();
		$menuitem = (int) $params->get('redirect_menuitem');

		// Check for redirection after submission when creating a new article
only
		if ($menuitem > 0 && $articleId == 0)
		{
			$lang = '';

			if (JLanguageMultilang::isEnabled())
			{
				$item = $app->getMenu()->getItem($menuitem);
				$lang = !is_null($item) && $item->language != '*'
? '&lang=' . $item->language : '';
			}

			// If ok, redirect to the return page.
			if ($result)
			{
				$this->setRedirect(JRoute::_('index.php?Itemid=' .
$menuitem . $lang, false));
			}
		}
		else
		{
			// If ok, redirect to the return page.
			if ($result)
			{
				$this->setRedirect(JRoute::_($this->getReturnPage(), false));
			}
		}

		return $result;
	}

	/**
	 * Method to reload a record.
	 *
	 * @param   string  $key     The name of the primary key of the URL
variable.
	 * @param   string  $urlVar  The name of the URL variable if different
from the primary key (sometimes required to avoid router collisions).
	 *
	 * @return  void
	 *
	 * @since   3.8.0
	 */
	public function reload($key = null, $urlVar = 'a_id')
	{
		return parent::reload($key, $urlVar);
	}

	/**
	 * Method to save a vote.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function vote()
	{
		// Check for request forgeries.
		$this->checkToken();

		$user_rating = $this->input->getInt('user_rating', -1);

		if ($user_rating > -1)
		{
			$url = $this->input->getString('url', '');
			$id = $this->input->getInt('id', 0);
			$viewName = $this->input->getString('view',
$this->default_view);
			$model = $this->getModel($viewName);

			// Don't redirect to an external URL.
			if (!JUri::isInternal($url))
			{
				$url = JRoute::_('index.php');
			}

			if ($model->storeVote($id, $user_rating))
			{
				$this->setRedirect($url,
JText::_('COM_CONTENT_ARTICLE_VOTE_SUCCESS'));
			}
			else
			{
				$this->setRedirect($url,
JText::_('COM_CONTENT_ARTICLE_VOTE_FAILURE'));
			}
		}
	}
}
PK��[.�#D��helpers/association.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContentHelper', JPATH_ADMINISTRATOR .
'/components/com_content/helpers/content.php');
JLoader::register('ContentHelperRoute', JPATH_SITE .
'/components/com_content/helpers/route.php');
JLoader::register('CategoryHelperAssociation',
JPATH_ADMINISTRATOR .
'/components/com_categories/helpers/association.php');

/**
 * Content Component Association Helper
 *
 * @since  3.0
 */
abstract class ContentHelperAssociation extends CategoryHelperAssociation
{
	/**
	 * Method to get the associations for a given item
	 *
	 * @param   integer  $id      Id of the item
	 * @param   string   $view    Name of the view
	 * @param   string   $layout  View layout
	 *
	 * @return  array   Array of associations for the item
	 *
	 * @since  3.0
	 */
	public static function getAssociations($id = 0, $view = null, $layout =
null)
	{
		$jinput    = JFactory::getApplication()->input;
		$view      = $view === null ? $jinput->get('view') : $view;
		$component = $jinput->getCmd('option');
		$id        = empty($id) ? $jinput->getInt('id') : $id;

		if ($layout === null && $jinput->get('view') ==
$view && $component == 'com_content')
		{
			$layout = $jinput->get('layout', '',
'string');
		}

		if ($view === 'article')
		{
			if ($id)
			{
				$user      = JFactory::getUser();
				$groups    = implode(',',
$user->getAuthorisedViewLevels());
				$db        = JFactory::getDbo();
				$advClause = array();

				// Filter by user groups
				$advClause[] = 'c2.access IN (' . $groups . ')';

				// Filter by current language
				$advClause[] = 'c2.language != ' .
$db->quote(JFactory::getLanguage()->getTag());

				if (!$user->authorise('core.edit.state',
'com_content') &&
!$user->authorise('core.edit', 'com_content'))
				{
					// Filter by start and end dates.
					$nullDate = $db->quote($db->getNullDate());
					$date = JFactory::getDate();

					$nowDate = $db->quote($date->toSql());

					$advClause[] = '(c2.publish_up = ' . $nullDate . ' OR
c2.publish_up <= ' . $nowDate . ')';
					$advClause[] = '(c2.publish_down = ' . $nullDate . ' OR
c2.publish_down >= ' . $nowDate . ')';

					// Filter by published
					$advClause[] = 'c2.state = 1';
				}

				$associations =
JLanguageAssociations::getAssociations('com_content',
'#__content', 'com_content.item', $id, 'id',
'alias', 'catid', $advClause);

				$return = array();

				foreach ($associations as $tag => $item)
				{
					$return[$tag] = ContentHelperRoute::getArticleRoute($item->id,
(int) $item->catid, $item->language, $layout);
				}

				return $return;
			}
		}

		if ($view === 'category' || $view === 'categories')
		{
			return self::getCategoryAssociations($id, 'com_content',
$layout);
		}

		return array();
	}

	/**
	 * Method to display in frontend the associations for a given article
	 *
	 * @param   integer  $id  Id of the article
	 *
	 * @return  array  An array containing the association URL and the related
language object
	 *
	 * @since  3.7.0
	 */
	public static function displayAssociations($id)
	{
		$return = array();

		if ($associations = self::getAssociations($id, 'article'))
		{
			$levels    = JFactory::getUser()->getAuthorisedViewLevels();
			$languages = JLanguageHelper::getLanguages();

			foreach ($languages as $language)
			{
				// Do not display language when no association
				if (empty($associations[$language->lang_code]))
				{
					continue;
				}

				// Do not display language without frontend UI
				if (!array_key_exists($language->lang_code,
JLanguageHelper::getInstalledLanguages(0)))
				{
					continue;
				}

				// Do not display language without specific home menu
				if (!array_key_exists($language->lang_code,
JLanguageMultilang::getSiteHomePages()))
				{
					continue;
				}

				// Do not display language without authorized access level
				if (isset($language->access) && $language->access
&& !in_array($language->access, $levels))
				{
					continue;
				}

				$return[$language->lang_code] = array('item' =>
$associations[$language->lang_code], 'language' =>
$language);
			}
		}

		return $return;
	}
}
PK��[Y�I��helpers/category.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Content Component Category Tree
 *
 * @since  1.6
 */
class ContentCategories extends JCategories
{
	/**
	 * Class constructor
	 *
	 * @param   array  $options  Array of options
	 *
	 * @since   1.7.0
	 */
	public function __construct($options = array())
	{
		$options['table'] = '#__content';
		$options['extension'] = 'com_content';

		parent::__construct($options);
	}
}
PK��[,ne���helpers/icon.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

/**
 * Content Component HTML Helper
 *
 * @since  1.5
 */
abstract class JHtmlIcon
{
	/**
	 * Method to generate a link to the create item page for the given
category
	 *
	 * @param   object    $category  The category information
	 * @param   Registry  $params    The item parameters
	 * @param   array     $attribs   Optional attributes for the link
	 * @param   boolean   $legacy    True to use legacy images, false to use
icomoon based graphic
	 *
	 * @return  string  The HTML markup for the create item link
	 */
	public static function create($category, $params, $attribs = array(),
$legacy = false)
	{
		$uri = JUri::getInstance();

		$url =
'index.php?option=com_content&task=article.add&return=' .
base64_encode($uri) . '&a_id=0&catid=' .
$category->id;

		$text = JLayoutHelper::render('joomla.content.icons.create',
array('params' => $params, 'legacy' => $legacy));

		// Add the button classes to the attribs array
		if (isset($attribs['class']))
		{
			$attribs['class'] .= ' btn btn-primary';
		}
		else
		{
			$attribs['class'] = 'btn btn-primary';
		}

		$button = JHtml::_('link', JRoute::_($url), $text, $attribs);

		$output = '<span class="hasTooltip" title="'
. JHtml::_('tooltipText', 'COM_CONTENT_CREATE_ARTICLE')
. '">' . $button . '</span>';

		return $output;
	}

	/**
	 * Method to generate a link to the email item page for the given article
	 *
	 * @param   object    $article  The article information
	 * @param   Registry  $params   The item parameters
	 * @param   array     $attribs  Optional attributes for the link
	 * @param   boolean   $legacy   True to use legacy images, false to use
icomoon based graphic
	 *
	 * @return  string  The HTML markup for the email item link
	 */
	public static function email($article, $params, $attribs = array(),
$legacy = false)
	{
		JLoader::register('MailtoHelper', JPATH_SITE .
'/components/com_mailto/helpers/mailto.php');

		$uri      = JUri::getInstance();
		$base     = $uri->toString(array('scheme', 'host',
'port'));
		$template = JFactory::getApplication()->getTemplate();
		$link     = $base .
JRoute::_(ContentHelperRoute::getArticleRoute($article->slug,
$article->catid, $article->language), false);
		$url      =
'index.php?option=com_mailto&tmpl=component&template=' .
$template . '&link=' . MailtoHelper::addLink($link);

		$height = JFactory::getApplication()->get('captcha',
'0') === '0' ? 450 : 550;
		$status = 'width=400,height=' . $height .
',menubar=yes,resizable=yes';

		$text = JLayoutHelper::render('joomla.content.icons.email',
array('params' => $params, 'legacy' => $legacy));

		$attribs['title']   =
JText::_('JGLOBAL_EMAIL_TITLE');
		$attribs['onclick'] =
"window.open(this.href,'win2','" . $status .
"'); return false;";
		$attribs['rel']     = 'nofollow';

		return JHtml::_('link', JRoute::_($url), $text, $attribs);
	}

	/**
	 * Display an edit icon for the article.
	 *
	 * This icon will not display in a popup window, nor if the article is
trashed.
	 * Edit access checks must be performed in the calling code.
	 *
	 * @param   object    $article  The article information
	 * @param   Registry  $params   The item parameters
	 * @param   array     $attribs  Optional attributes for the link
	 * @param   boolean   $legacy   True to use legacy images, false to use
icomoon based graphic
	 *
	 * @return  string	The HTML for the article edit icon.
	 *
	 * @since   1.6
	 */
	public static function edit($article, $params, $attribs = array(), $legacy
= false)
	{
		$user = JFactory::getUser();
		$uri  = JUri::getInstance();

		// Ignore if in a popup window.
		if ($params && $params->get('popup'))
		{
			return;
		}

		// Ignore if the state is negative (trashed).
		if ($article->state < 0)
		{
			return;
		}

		// Show checked_out icon if the article is checked out by a different
user
		if (property_exists($article, 'checked_out')
			&& property_exists($article, 'checked_out_time')
			&& $article->checked_out > 0
			&& $article->checked_out != $user->get('id'))
		{
			$checkoutUser = JFactory::getUser($article->checked_out);
			$date         = JHtml::_('date',
$article->checked_out_time);
			$tooltip      = JText::_('JLIB_HTML_CHECKED_OUT') . ' ::
' . JText::sprintf('COM_CONTENT_CHECKED_OUT_BY',
$checkoutUser->name)
				. ' <br /> ' . $date;

			$text =
JLayoutHelper::render('joomla.content.icons.edit_lock',
array('tooltip' => $tooltip, 'legacy' =>
$legacy));

			$output = JHtml::_('link', '#', $text, $attribs);

			return $output;
		}

		$contentUrl = ContentHelperRoute::getArticleRoute($article->slug,
$article->catid, $article->language);
		$url        = $contentUrl . '&task=article.edit&a_id='
. $article->id . '&return=' . base64_encode($uri);

		if ($article->state == 0)
		{
			$overlib = JText::_('JUNPUBLISHED');
		}
		else
		{
			$overlib = JText::_('JPUBLISHED');
		}

		$date   = JHtml::_('date', $article->created);
		$author = $article->created_by_alias ?: $article->author;

		$overlib .= '&lt;br /&gt;';
		$overlib .= $date;
		$overlib .= '&lt;br /&gt;';
		$overlib .= JText::sprintf('COM_CONTENT_WRITTEN_BY',
htmlspecialchars($author, ENT_COMPAT, 'UTF-8'));

		$text = JLayoutHelper::render('joomla.content.icons.edit',
array('article' => $article, 'overlib' =>
$overlib, 'legacy' => $legacy));

		$attribs['title']   = JText::_('JGLOBAL_EDIT_TITLE');
		$output = JHtml::_('link', JRoute::_($url), $text, $attribs);

		return $output;
	}

	/**
	 * Method to generate a popup link to print an article
	 *
	 * @param   object    $article  The article information
	 * @param   Registry  $params   The item parameters
	 * @param   array     $attribs  Optional attributes for the link
	 * @param   boolean   $legacy   True to use legacy images, false to use
icomoon based graphic
	 *
	 * @return  string  The HTML markup for the popup link
	 */
	public static function print_popup($article, $params, $attribs = array(),
$legacy = false)
	{
		$url  = ContentHelperRoute::getArticleRoute($article->slug,
$article->catid, $article->language);
		$url .= '&tmpl=component&print=1&layout=default';

		$status =
'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';

		$text =
JLayoutHelper::render('joomla.content.icons.print_popup',
array('params' => $params, 'legacy' => $legacy));

		$attribs['title']   =
JText::sprintf('JGLOBAL_PRINT_TITLE',
htmlspecialchars($article->title, ENT_QUOTES, 'UTF-8'));
		$attribs['onclick'] =
"window.open(this.href,'win2','" . $status .
"'); return false;";
		$attribs['rel']     = 'nofollow';

		return JHtml::_('link', JRoute::_($url), $text, $attribs);
	}

	/**
	 * Method to generate a link to print an article
	 *
	 * @param   object    $article  Not used, @deprecated for 4.0
	 * @param   Registry  $params   The item parameters
	 * @param   array     $attribs  Not used, @deprecated for 4.0
	 * @param   boolean   $legacy   True to use legacy images, false to use
icomoon based graphic
	 *
	 * @return  string  The HTML markup for the popup link
	 */
	public static function print_screen($article, $params, $attribs = array(),
$legacy = false)
	{
		$text =
JLayoutHelper::render('joomla.content.icons.print_screen',
array('params' => $params, 'legacy' => $legacy));

		return '<a href="#" onclick="window.print();return
false;">' . $text . '</a>';
	}
}
PK��[���|'|'helpers/legacyrouter.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Legacy routing rules class from com_content
 *
 * @since       3.6
 * @deprecated  4.0
 */
class ContentRouterRulesLegacy implements JComponentRouterRulesInterface
{
	/**
	 * Constructor for this legacy router
	 *
	 * @param   JComponentRouterView  $router  The router this rule belongs to
	 *
	 * @since       3.6
	 * @deprecated  4.0
	 */
	public function __construct($router)
	{
		$this->router = $router;
	}

	/**
	 * Preprocess the route for the com_content component
	 *
	 * @param   array  &$query  An array of URL arguments
	 *
	 * @return  void
	 *
	 * @since       3.6
	 * @deprecated  4.0
	 */
	public function preprocess(&$query)
	{
	}

	/**
	 * Build the route for the com_content component
	 *
	 * @param   array  &$query     An array of URL arguments
	 * @param   array  &$segments  The URL arguments to use to assemble
the subsequent URL.
	 *
	 * @return  void
	 *
	 * @since       3.6
	 * @deprecated  4.0
	 */
	public function build(&$query, &$segments)
	{
		// Get a menu item based on Itemid or currently active
		$params = JComponentHelper::getParams('com_content');
		$advanced = $params->get('sef_advanced_link', 0);

		// We need a menu item.  Either the one specified in the query, or the
current active one if none specified
		if (empty($query['Itemid']))
		{
			$menuItem = $this->router->menu->getActive();
			$menuItemGiven = false;
		}
		else
		{
			$menuItem =
$this->router->menu->getItem($query['Itemid']);
			$menuItemGiven = true;
		}

		// Check again
		if ($menuItemGiven && isset($menuItem) &&
$menuItem->component != 'com_content')
		{
			$menuItemGiven = false;
			unset($query['Itemid']);
		}

		if (isset($query['view']))
		{
			$view = $query['view'];
		}
		else
		{
			// We need to have a view in the query or it is an invalid URL
			return;
		}

		// Are we dealing with an article or category that is attached to a menu
item?
		if ($menuItem !== null
			&& isset($menuItem->query['view'],
$query['view'], $menuItem->query['id'],
$query['id'])
			&& $menuItem->query['view'] ==
$query['view']
			&& $menuItem->query['id'] == (int)
$query['id'])
		{
			unset($query['view']);

			if (isset($query['catid']))
			{
				unset($query['catid']);
			}

			if (isset($query['layout']))
			{
				unset($query['layout']);
			}

			unset($query['id']);

			return;
		}

		if ($view == 'category' || $view == 'article')
		{
			if (!$menuItemGiven)
			{
				$segments[] = $view;
			}

			unset($query['view']);

			if ($view == 'article')
			{
				if (isset($query['id']) &&
isset($query['catid']) && $query['catid'])
				{
					$catid = $query['catid'];

					// Make sure we have the id and the alias
					if (strpos($query['id'], ':') === false)
					{
						$db = JFactory::getDbo();
						$dbQuery = $db->getQuery(true)
							->select('alias')
							->from('#__content')
							->where('id=' . (int) $query['id']);
						$db->setQuery($dbQuery);
						$alias = $db->loadResult();
						$query['id'] = $query['id'] . ':' .
$alias;
					}
				}
				else
				{
					// We should have these two set for this view.  If we don't, it
is an error
					return;
				}
			}
			else
			{
				if (isset($query['id']))
				{
					$catid = $query['id'];
				}
				else
				{
					// We should have id set for this view.  If we don't, it is an
error
					return;
				}
			}

			if ($menuItemGiven &&
isset($menuItem->query['id']))
			{
				$mCatid = $menuItem->query['id'];
			}
			else
			{
				$mCatid = 0;
			}

			$categories = JCategories::getInstance('Content');
			$category = $categories->get($catid);

			if (!$category)
			{
				// We couldn't find the category we were given.  Bail.
				return;
			}

			$path = array_reverse($category->getPath());

			$array = array();

			foreach ($path as $id)
			{
				if ((int) $id == (int) $mCatid)
				{
					break;
				}

				list($tmp, $id) = explode(':', $id, 2);

				$array[] = $id;
			}

			$array = array_reverse($array);

			if (!$advanced && count($array))
			{
				$array[0] = (int) $catid . ':' . $array[0];
			}

			$segments = array_merge($segments, $array);

			if ($view == 'article')
			{
				if ($advanced)
				{
					list($tmp, $id) = explode(':', $query['id'], 2);
				}
				else
				{
					$id = $query['id'];
				}

				$segments[] = $id;
			}

			unset($query['id'], $query['catid']);
		}

		if ($view == 'archive')
		{
			if (!$menuItemGiven)
			{
				$segments[] = $view;
				unset($query['view']);
			}

			if (isset($query['year']))
			{
				if ($menuItemGiven)
				{
					$segments[] = $query['year'];
					unset($query['year']);
				}
			}

			if (isset($query['year']) &&
isset($query['month']))
			{
				if ($menuItemGiven)
				{
					$segments[] = $query['month'];
					unset($query['month']);
				}
			}
		}

		if ($view == 'featured')
		{
			if (!$menuItemGiven)
			{
				$segments[] = $view;
			}

			unset($query['view']);
		}

		/*
		 * If the layout is specified and it is the same as the layout in the
menu item, we
		 * unset it so it doesn't go into the query string.
		 */
		if (isset($query['layout']))
		{
			if ($menuItemGiven &&
isset($menuItem->query['layout']))
			{
				if ($query['layout'] ==
$menuItem->query['layout'])
				{
					unset($query['layout']);
				}
			}
			else
			{
				if ($query['layout'] == 'default')
				{
					unset($query['layout']);
				}
			}
		}

		$total = count($segments);

		for ($i = 0; $i < $total; $i++)
		{
			$segments[$i] = str_replace(':', '-',
$segments[$i]);
		}
	}

	/**
	 * Parse the segments of a URL.
	 *
	 * @param   array  &$segments  The segments of the URL to parse.
	 * @param   array  &$vars      The URL attributes to be used by the
application.
	 *
	 * @return  void
	 *
	 * @since       3.6
	 * @deprecated  4.0
	 */
	public function parse(&$segments, &$vars)
	{
		$total = count($segments);

		for ($i = 0; $i < $total; $i++)
		{
			$segments[$i] = preg_replace('/-/', ':',
$segments[$i], 1);
		}

		// Get the active menu item.
		$item = $this->router->menu->getActive();
		$params = JComponentHelper::getParams('com_content');
		$advanced = $params->get('sef_advanced_link', 0);
		$db = JFactory::getDbo();

		// Count route segments
		$count = count($segments);

		/*
		 * Standard routing for articles.  If we don't pick up an Itemid
then we get the view from the segments
		 * the first segment is the view and the last segment is the id of the
article or category.
		 */
		if (!isset($item))
		{
			$vars['view'] = $segments[0];
			$vars['id'] = $segments[$count - 1];

			return;
		}

		/*
		 * If there is only one segment, then it points to either an article or a
category.
		 * We test it first to see if it is a category.  If the id and alias
match a category,
		 * then we assume it is a category.  If they don't we assume it is
an article
		 */
		if ($count == 1)
		{
			// We check to see if an alias is given.  If not, we assume it is an
article
			if (strpos($segments[0], ':') === false)
			{
				$vars['view'] = 'article';
				$vars['id'] = (int) $segments[0];

				return;
			}

			list($id, $alias) = explode(':', $segments[0], 2);

			// First we check if it is a category
			$category = JCategories::getInstance('Content')->get($id);

			if ($category && $category->alias == $alias)
			{
				$vars['view'] = 'category';
				$vars['id'] = $id;

				return;
			}
			else
			{
				$query = $db->getQuery(true)
					->select($db->quoteName(array('alias',
'catid')))
					->from($db->quoteName('#__content'))
					->where($db->quoteName('id') . ' = ' . (int)
$id);
				$db->setQuery($query);
				$article = $db->loadObject();

				if ($article)
				{
					if ($article->alias == $alias)
					{
						$vars['view'] = 'article';
						$vars['catid'] = (int) $article->catid;
						$vars['id'] = (int) $id;

						return;
					}
				}
			}
		}

		/*
		 * If there was more than one segment, then we can determine where the
URL points to
		 * because the first segment will have the target category id prepended
to it.  If the
		 * last segment has a number prepended, it is an article, otherwise, it
is a category.
		 */
		if (!$advanced)
		{
			$cat_id = (int) $segments[0];

			$article_id = (int) $segments[$count - 1];

			if ($article_id > 0)
			{
				$vars['view'] = 'article';
				$vars['catid'] = $cat_id;
				$vars['id'] = $article_id;
			}
			else
			{
				$vars['view'] = 'category';
				$vars['id'] = $cat_id;
			}

			return;
		}

		// We get the category id from the menu item and search from there
		$id = $item->query['id'];
		$category = JCategories::getInstance('Content')->get($id);

		if (!$category)
		{
			JError::raiseError(404,
JText::_('COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND'));

			return;
		}

		$categories = $category->getChildren();
		$vars['catid'] = $id;
		$vars['id'] = $id;
		$found = 0;

		foreach ($segments as $segment)
		{
			$segment = str_replace(':', '-', $segment);

			foreach ($categories as $category)
			{
				if ($category->alias == $segment)
				{
					$vars['id'] = $category->id;
					$vars['catid'] = $category->id;
					$vars['view'] = 'category';
					$categories = $category->getChildren();
					$found = 1;
					break;
				}
			}

			if ($found == 0)
			{
				if ($advanced)
				{
					$db = JFactory::getDbo();
					$query = $db->getQuery(true)
						->select($db->quoteName('id'))
						->from('#__content')
						->where($db->quoteName('catid') . ' = ' .
(int) $vars['catid'])
						->where($db->quoteName('alias') . ' = ' .
$db->quote($segment));
					$db->setQuery($query);
					$cid = $db->loadResult();
				}
				else
				{
					$cid = $segment;
				}

				$vars['id'] = $cid;

				if ($item->query['view'] == 'archive' &&
$count != 1)
				{
					$vars['year'] = $count >= 2 ? $segments[$count - 2] :
null;
					$vars['month'] = $segments[$count - 1];
					$vars['view'] = 'archive';
				}
				else
				{
					$vars['view'] = 'article';
				}
			}

			$found = 0;
		}
	}
}
PK��[���#helpers/query.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Content Component Query Helper
 *
 * @since  1.5
 */
class ContentHelperQuery
{
	/**
	 * Translate an order code to a field for primary category ordering.
	 *
	 * @param   string  $orderby  The ordering code.
	 *
	 * @return  string  The SQL field(s) to order by.
	 *
	 * @since   1.5
	 */
	public static function orderbyPrimary($orderby)
	{
		switch ($orderby)
		{
			case 'alpha' :
				$orderby = 'c.path, ';
				break;

			case 'ralpha' :
				$orderby = 'c.path DESC, ';
				break;

			case 'order' :
				$orderby = 'c.lft, ';
				break;

			default :
				$orderby = '';
				break;
		}

		return $orderby;
	}

	/**
	 * Translate an order code to a field for secondary category ordering.
	 *
	 * @param   string  $orderby    The ordering code.
	 * @param   string  $orderDate  The ordering code for the date.
	 *
	 * @return  string  The SQL field(s) to order by.
	 *
	 * @since   1.5
	 */
	public static function orderbySecondary($orderby, $orderDate =
'created')
	{
		$queryDate = self::getQueryDate($orderDate);

		switch ($orderby)
		{
			case 'date' :
				$orderby = $queryDate;
				break;

			case 'rdate' :
				$orderby = $queryDate . ' DESC ';
				break;

			case 'alpha' :
				$orderby = 'a.title';
				break;

			case 'ralpha' :
				$orderby = 'a.title DESC';
				break;

			case 'hits' :
				$orderby = 'a.hits DESC';
				break;

			case 'rhits' :
				$orderby = 'a.hits';
				break;

			case 'order' :
				$orderby = 'a.ordering';
				break;

			case 'rorder' :
				$orderby = 'a.ordering DESC';
				break;

			case 'author' :
				$orderby = 'author';
				break;

			case 'rauthor' :
				$orderby = 'author DESC';
				break;

			case 'front' :
				$orderby = 'a.featured DESC, fp.ordering, ' . $queryDate .
' DESC ';
				break;

			case 'random' :
				$orderby = JFactory::getDbo()->getQuery(true)->Rand();
				break;

			case 'vote' :
				$orderby = 'a.id DESC ';

				if (JPluginHelper::isEnabled('content', 'vote'))
				{
					$orderby = 'rating_count DESC ';
				}
				break;

			case 'rvote' :
				$orderby = 'a.id ASC ';

				if (JPluginHelper::isEnabled('content', 'vote'))
				{
					$orderby = 'rating_count ASC ';
				}
				break;

			case 'rank' :
				$orderby = 'a.id DESC ';

				if (JPluginHelper::isEnabled('content', 'vote'))
				{
					$orderby = 'rating DESC ';
				}
				break;

			case 'rrank' :
				$orderby = 'a.id ASC ';

				if (JPluginHelper::isEnabled('content', 'vote'))
				{
					$orderby = 'rating ASC ';
				}
				break;

			default :
				$orderby = 'a.ordering';
				break;
		}

		return $orderby;
	}

	/**
	 * Translate an order code to a field for primary category ordering.
	 *
	 * @param   string  $orderDate  The ordering code.
	 *
	 * @return  string  The SQL field(s) to order by.
	 *
	 * @since   1.6
	 */
	public static function getQueryDate($orderDate)
	{
		$db = JFactory::getDbo();

		switch ($orderDate)
		{
			case 'modified' :
				$queryDate = ' CASE WHEN a.modified = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.modified END';
				break;

			// Use created if publish_up is not set
			case 'published' :
				$queryDate = ' CASE WHEN a.publish_up = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.publish_up END ';
				break;

			case 'unpublished' :
				$queryDate = ' CASE WHEN a.publish_down = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.publish_down END ';
				break;
			case 'created' :
			default :
				$queryDate = ' a.created ';
				break;
		}

		return $queryDate;
	}

	/**
	 * Get join information for the voting query.
	 *
	 * @param   \Joomla\Registry\Registry  $params  An options object for the
article.
	 *
	 * @return  array  A named array with "select" and
"join" keys.
	 *
	 * @since   1.5
	 */
	public static function buildVotingQuery($params = null)
	{
		if (!$params)
		{
			$params = JComponentHelper::getParams('com_content');
		}

		$voting = $params->get('show_vote');

		if ($voting)
		{
			// Calculate voting count
			$select = ' , ROUND(v.rating_sum / v.rating_count) AS rating,
v.rating_count';
			$join = ' LEFT JOIN #__content_rating AS v ON a.id =
v.content_id';
		}
		else
		{
			$select = '';
			$join = '';
		}

		return array('select' => $select, 'join' =>
$join);
	}

	/**
	 * Method to order the intro articles array for ordering
	 * down the columns instead of across.
	 * The layout always lays the introtext articles out across columns.
	 * Array is reordered so that, when articles are displayed in index order
	 * across columns in the layout, the result is that the
	 * desired article ordering is achieved down the columns.
	 *
	 * @param   array    &$articles   Array of intro text articles
	 * @param   integer  $numColumns  Number of columns in the layout
	 *
	 * @return  array  Reordered array to achieve desired ordering down
columns
	 *
	 * @since       1.6
	 * @deprecated  4.0 
	 */
	public static function orderDownColumns(&$articles, $numColumns = 1)
	{
		$count = count($articles);

		// Just return the same array if there is nothing to change
		if ($numColumns == 1 || !is_array($articles) || $count <= $numColumns)
		{
			$return = $articles;
		}
		// We need to re-order the intro articles array
		else
		{
			// We need to preserve the original array keys
			$keys = array_keys($articles);

			$maxRows = ceil($count / $numColumns);
			$numCells = $maxRows * $numColumns;
			$numEmpty = $numCells - $count;
			$index = array();

			// Calculate number of empty cells in the array

			// Fill in all cells of the array
			// Put -1 in empty cells so we can skip later
			for ($row = 1, $i = 1; $row <= $maxRows; $row++)
			{
				for ($col = 1; $col <= $numColumns; $col++)
				{
					if ($numEmpty > ($numCells - $i))
					{
						// Put -1 in empty cells
						$index[$row][$col] = -1;
					}
					else
					{
						// Put in zero as placeholder
						$index[$row][$col] = 0;
					}

					$i++;
				}
			}

			// Layout the articles in column order, skipping empty cells
			$i = 0;

			for ($col = 1; ($col <= $numColumns) && ($i < $count);
$col++)
			{
				for ($row = 1; ($row <= $maxRows) && ($i < $count);
$row++)
				{
					if ($index[$row][$col] != - 1)
					{
						$index[$row][$col] = $keys[$i];
						$i++;
					}
				}
			}

			// Now read the $index back row by row to get articles in right row/col
			// so that they will actually be ordered down the columns (when read by
row in the layout)
			$return = array();
			$i = 0;

			for ($row = 1; ($row <= $maxRows) && ($i < $count);
$row++)
			{
				for ($col = 1; ($col <= $numColumns) && ($i < $count);
$col++)
				{
					$return[$keys[$i]] = $articles[$index[$row][$col]];
					$i++;
				}
			}
		}

		return $return;
	}
}
PK��[�a3�aahelpers/route.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Content Component Route Helper.
 *
 * @since  1.5
 */
abstract class ContentHelperRoute
{
	/**
	 * Get the article route.
	 *
	 * @param   integer  $id        The route of the content item.
	 * @param   integer  $catid     The category ID.
	 * @param   integer  $language  The language code.
	 * @param   string   $layout    The layout value.
	 *
	 * @return  string  The article route.
	 *
	 * @since   1.5
	 */
	public static function getArticleRoute($id, $catid = 0, $language = 0,
$layout = null)
	{
		// Create the link
		$link = 'index.php?option=com_content&view=article&id='
. $id;

		if ((int) $catid > 1)
		{
			$link .= '&catid=' . $catid;
		}

		if ($language && $language !== '*' &&
JLanguageMultilang::isEnabled())
		{
			$link .= '&lang=' . $language;
		}

		if ($layout)
		{
			$link .= '&layout=' . $layout;
		}

		return $link;
	}

	/**
	 * Get the category route.
	 *
	 * @param   integer  $catid     The category ID.
	 * @param   integer  $language  The language code.
	 * @param   string   $layout    The layout value.
	 *
	 * @return  string  The article route.
	 *
	 * @since   1.5
	 */
	public static function getCategoryRoute($catid, $language = 0, $layout =
null)
	{
		if ($catid instanceof JCategoryNode)
		{
			$id = $catid->id;
		}
		else
		{
			$id = (int) $catid;
		}

		if ($id < 1)
		{
			return '';
		}

		$link =
'index.php?option=com_content&view=category&id=' . $id;

		if ($language && $language !== '*' &&
JLanguageMultilang::isEnabled())
		{
			$link .= '&lang=' . $language;
		}

		if ($layout)
		{
			$link .= '&layout=' . $layout;
		}

		return $link;
	}

	/**
	 * Get the form route.
	 *
	 * @param   integer  $id  The form ID.
	 *
	 * @return  string  The article route.
	 *
	 * @since   1.5
	 */
	public static function getFormRoute($id)
	{
		return
'index.php?option=com_content&task=article.edit&a_id=' .
(int) $id;
	}
}
PK��[9ˆP11models/archive.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

JLoader::register('ContentModelArticles', __DIR__ .
'/articles.php');

/**
 * Content Component Archive Model
 *
 * @since  1.5
 */
class ContentModelArchive extends ContentModelArticles
{
	/**
	 * Model context string.
	 *
	 * @var		string
	 */
	public $_context = 'com_content.archive';

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @param   string  $ordering   The field to order on.
	 * @param   string  $direction  The direction to order on.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		parent::populateState();

		$app = JFactory::getApplication();

		// Add archive properties
		$params = $this->state->params;

		// Filter on archived articles
		$this->setState('filter.published', 2);

		// Filter on month, year
		$this->setState('filter.month',
$app->input->getInt('month'));
		$this->setState('filter.year',
$app->input->getInt('year'));

		// Optional filter text
		$this->setState('list.filter',
$app->input->getString('filter-search'));

		// Get list limit
		$itemid = $app->input->get('Itemid', 0, 'int');
		$limit =
$app->getUserStateFromRequest('com_content.archive.list' .
$itemid . '.limit', 'limit',
$params->get('display_num'), 'uint');
		$this->setState('list.limit', $limit);

		// Set the archive ordering
		$articleOrderby   = $params->get('orderby_sec',
'rdate');
		$articleOrderDate = $params->get('order_date');

		// No category ordering
		$secondary = ContentHelperQuery::orderbySecondary($articleOrderby,
$articleOrderDate);

		$this->setState('list.ordering', $secondary . ',
a.created DESC');
		$this->setState('list.direction', '');
	}

	/**
	 * Get the master query for retrieving a list of articles subject to the
model state.
	 *
	 * @return  JDatabaseQuery
	 *
	 * @since   1.6
	 */
	protected function getListQuery()
	{
		$params           = $this->state->params;
		$app              = JFactory::getApplication('site');
		$catids           =
ArrayHelper::toInteger($app->input->get('catid', array(),
'array'));
		$catids           = array_values(array_diff($catids, array(0)));
		$articleOrderDate = $params->get('order_date');

		// Create a new query object.
		$query = parent::getListQuery();

			// Add routing for archive
			// Sqlsrv changes
		$case_when = ' CASE WHEN ';
		$case_when .= $query->charLength('a.alias', '!=',
'0');
		$case_when .= ' THEN ';
		$a_id = $query->castAsChar('a.id');
		$case_when .= $query->concatenate(array($a_id, 'a.alias'),
':');
		$case_when .= ' ELSE ';
		$case_when .= $a_id . ' END as slug';

		$query->select($case_when);

		$case_when = ' CASE WHEN ';
		$case_when .= $query->charLength('c.alias', '!=',
'0');
		$case_when .= ' THEN ';
		$c_id = $query->castAsChar('c.id');
		$case_when .= $query->concatenate(array($c_id, 'c.alias'),
':');
		$case_when .= ' ELSE ';
		$case_when .= $c_id . ' END as catslug';
		$query->select($case_when);

		// Filter on month, year
		// First, get the date field
		$queryDate = ContentHelperQuery::getQueryDate($articleOrderDate);

		if ($month = $this->getState('filter.month'))
		{
			$query->where($query->month($queryDate) . ' = ' .
$month);
		}

		if ($year = $this->getState('filter.year'))
		{
			$query->where($query->year($queryDate) . ' = ' . $year);
		}

		if (count($catids) > 0)
		{
			$query->where('c.id IN (' . implode(', ',
$catids) . ')');
		}

		return $query;
	}

	/**
	 * Method to get the archived article list
	 *
	 * @access public
	 * @return array
	 */
	public function getData()
	{
		$app = JFactory::getApplication();

		// Lets load the content if it doesn't already exist
		if (empty($this->_data))
		{
			// Get the page/component configuration
			$params = $app->getParams();

			// Get the pagination request variables
			$limit      = $app->input->get('limit',
$params->get('display_num', 20), 'uint');
			$limitstart = $app->input->get('limitstart', 0,
'uint');

			$query = $this->_buildQuery();

			$this->_data = $this->_getList($query, $limitstart, $limit);
		}

		return $this->_data;
	}

	/**
	 * JModelLegacy override to add alternating value for $odd
	 *
	 * @param   string   $query       The query.
	 * @param   integer  $limitstart  Offset.
	 * @param   integer  $limit       The number of records.
	 *
	 * @return  array  An array of results.
	 *
	 * @since   3.0.1
	 * @throws  RuntimeException
	 */
	protected function _getList($query, $limitstart=0, $limit=0)
	{
		$result = parent::_getList($query, $limitstart, $limit);

		$odd = 1;

		foreach ($result as $k => $row)
		{
			$result[$k]->odd = $odd;
			$odd = 1 - $odd;
		}

		return $result;
	}

	/**
	 * Gets the archived articles years
	 *
	 * @return   array
	 *
	 * @since    3.6.0
	 */
	public function getYears()
	{
		$db = $this->getDbo();
		$nullDate = $db->quote($db->getNullDate());
		$nowDate  = $db->quote(JFactory::getDate()->toSql());

		$query = $db->getQuery(true);
		$years = $query->year($db->qn('created'));
		$query->select('DISTINCT (' . $years . ')')
			->from($db->qn('#__content'))
			->where($db->qn('state') . '= 2')
			->where('(publish_up = ' . $nullDate . ' OR publish_up
<= ' . $nowDate . ')')
			->where('(publish_down = ' . $nullDate . ' OR
publish_down >= ' . $nowDate . ')')
			->order('1 ASC');

		$db->setQuery($query);

		return $db->loadColumn();
	}
}
PK��[�#���)�)models/article.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\IpHelper;

/**
 * Content Component Article Model
 *
 * @since  1.5
 */
class ContentModelArticle extends JModelItem
{
	/**
	 * Model context string.
	 *
	 * @var        string
	 */
	protected $_context = 'com_content.article';

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @since   1.6
	 *
	 * @return void
	 */
	protected function populateState()
	{
		$app = JFactory::getApplication('site');

		// Load state from the request.
		$pk = $app->input->getInt('id');
		$this->setState('article.id', $pk);

		$offset = $app->input->getUInt('limitstart');
		$this->setState('list.offset', $offset);

		// Load the parameters.
		$params = $app->getParams();
		$this->setState('params', $params);

		$user = JFactory::getUser();

		// If $pk is set then authorise on complete asset, else on component only
		$asset = empty($pk) ? 'com_content' :
'com_content.article.' . $pk;

		if ((!$user->authorise('core.edit.state', $asset))
&& (!$user->authorise('core.edit', $asset)))
		{
			$this->setState('filter.published', 1);
			$this->setState('filter.archived', 2);
		}

		$this->setState('filter.language',
JLanguageMultilang::isEnabled());
	}

	/**
	 * Method to get article data.
	 *
	 * @param   integer  $pk  The id of the article.
	 *
	 * @return  object|boolean|JException  Menu item data object on success,
boolean false or JException instance on error
	 */
	public function getItem($pk = null)
	{
		$user = JFactory::getUser();

		$pk = (!empty($pk)) ? $pk : (int)
$this->getState('article.id');

		if ($this->_item === null)
		{
			$this->_item = array();
		}

		if (!isset($this->_item[$pk]))
		{
			try
			{
				$db = $this->getDbo();
				$query = $db->getQuery(true)
					->select(
						$this->getState(
							'item.select', 'a.id, a.asset_id, a.title, a.alias,
a.introtext, a.fulltext, ' .
							'a.state, a.catid, a.created, a.created_by, a.created_by_alias,
' .
							// Use created if modified is 0
							'CASE WHEN a.modified = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.modified END as modified, ' .
							'a.modified_by, a.checked_out, a.checked_out_time,
a.publish_up, a.publish_down, ' .
							'a.images, a.urls, a.attribs, a.version, a.ordering, ' .
							'a.metakey, a.metadesc, a.access, a.hits, a.metadata,
a.featured, a.language, a.xreference'
						)
					);
				$query->from('#__content AS a')
					->where('a.id = ' . (int) $pk);

				// Join on category table.
				$query->select('c.title AS category_title, c.alias AS
category_alias, c.access AS category_access')
					->innerJoin('#__categories AS c on c.id = a.catid')
					->where('c.published > 0');

				// Join on user table.
				$query->select('u.name AS author')
					->join('LEFT', '#__users AS u on u.id =
a.created_by');

				// Filter by language
				if ($this->getState('filter.language'))
				{
					$query->where('a.language in (' .
$db->quote(JFactory::getLanguage()->getTag()) . ',' .
$db->quote('*') . ')');
				}

				// Join over the categories to get parent category titles
				$query->select('parent.title as parent_title, parent.id as
parent_id, parent.path as parent_route, parent.alias as parent_alias')
					->join('LEFT', '#__categories as parent ON parent.id
= c.parent_id');

				// Join on voting table
				$query->select('ROUND(v.rating_sum / v.rating_count, 0) AS
rating, v.rating_count as rating_count')
					->join('LEFT', '#__content_rating AS v ON a.id =
v.content_id');

				if ((!$user->authorise('core.edit.state',
'com_content.article.' . $pk)) &&
(!$user->authorise('core.edit',
'com_content.article.' . $pk)))
				{
					// Filter by start and end dates.
					$nullDate = $db->quote($db->getNullDate());
					$date = JFactory::getDate();

					$nowDate = $db->quote($date->toSql());

					$query->where('(a.publish_up = ' . $nullDate . ' OR
a.publish_up <= ' . $nowDate . ')')
						->where('(a.publish_down = ' . $nullDate . ' OR
a.publish_down >= ' . $nowDate . ')');
				}

				// Filter by published state.
				$published = $this->getState('filter.published');
				$archived = $this->getState('filter.archived');

				if (is_numeric($published))
				{
					$query->where('(a.state = ' . (int) $published . '
OR a.state =' . (int) $archived . ')');
				}

				$db->setQuery($query);

				$data = $db->loadObject();

				if (empty($data))
				{
					return JError::raiseError(404,
JText::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND'));
				}

				// Check for published state if filter set.
				if ((is_numeric($published) || is_numeric($archived)) &&
(($data->state != $published) && ($data->state !=
$archived)))
				{
					return JError::raiseError(404,
JText::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND'));
				}

				// Convert parameter fields to objects.
				$registry = new Registry($data->attribs);

				$data->params = clone $this->getState('params');
				$data->params->merge($registry);

				$data->metadata = new Registry($data->metadata);

				// Technically guest could edit an article, but lets not check that to
improve performance a little.
				if (!$user->get('guest'))
				{
					$userId = $user->get('id');
					$asset = 'com_content.article.' . $data->id;

					// Check general edit permission first.
					if ($user->authorise('core.edit', $asset))
					{
						$data->params->set('access-edit', true);
					}

					// Now check if edit.own is available.
					elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset))
					{
						// Check for a valid user and that they are the owner.
						if ($userId == $data->created_by)
						{
							$data->params->set('access-edit', true);
						}
					}
				}

				// Compute view access permissions.
				if ($access = $this->getState('filter.access'))
				{
					// If the access filter has been set, we already know this user can
view.
					$data->params->set('access-view', true);
				}
				else
				{
					// If no access filter is set, the layout takes some responsibility
for display of limited information.
					$user = JFactory::getUser();
					$groups = $user->getAuthorisedViewLevels();

					if ($data->catid == 0 || $data->category_access === null)
					{
						$data->params->set('access-view',
in_array($data->access, $groups));
					}
					else
					{
						$data->params->set('access-view',
in_array($data->access, $groups) &&
in_array($data->category_access, $groups));
					}
				}

				$this->_item[$pk] = $data;
			}
			catch (Exception $e)
			{
				if ($e->getCode() == 404)
				{
					// Need to go thru the error handler to allow Redirect to work.
					JError::raiseError(404, $e->getMessage());
				}
				else
				{
					$this->setError($e);
					$this->_item[$pk] = false;
				}
			}
		}

		return $this->_item[$pk];
	}

	/**
	 * Increment the hit counter for the article.
	 *
	 * @param   integer  $pk  Optional primary key of the article to
increment.
	 *
	 * @return  boolean  True if successful; false otherwise and internal
error set.
	 */
	public function hit($pk = 0)
	{
		$input = JFactory::getApplication()->input;
		$hitcount = $input->getInt('hitcount', 1);

		if ($hitcount)
		{
			$pk = (!empty($pk)) ? $pk : (int)
$this->getState('article.id');

			$table = JTable::getInstance('Content', 'JTable');
			$table->hit($pk);
		}

		return true;
	}

	/**
	 * Save user vote on article
	 *
	 * @param   integer  $pk    Joomla Article Id
	 * @param   integer  $rate  Voting rate
	 *
	 * @return  boolean          Return true on success
	 */
	public function storeVote($pk = 0, $rate = 0)
	{
		if ($rate >= 1 && $rate <= 5 && $pk > 0)
		{
			$userIP = IpHelper::getIp();

			// Initialize variables.
			$db    = $this->getDbo();
			$query = $db->getQuery(true);

			// Create the base select statement.
			$query->select('*')
				->from($db->quoteName('#__content_rating'))
				->where($db->quoteName('content_id') . ' = '
. (int) $pk);

			// Set the query and load the result.
			$db->setQuery($query);

			// Check for a database error.
			try
			{
				$rating = $db->loadObject();
			}
			catch (RuntimeException $e)
			{
				JError::raiseWarning(500, $e->getMessage());

				return false;
			}

			// There are no ratings yet, so lets insert our rating
			if (!$rating)
			{
				$query = $db->getQuery(true);

				// Create the base insert statement.
				$query->insert($db->quoteName('#__content_rating'))
					->columns(array($db->quoteName('content_id'),
$db->quoteName('lastip'),
$db->quoteName('rating_sum'),
$db->quoteName('rating_count')))
					->values((int) $pk . ', ' . $db->quote($userIP) .
',' . (int) $rate . ', 1');

				// Set the query and execute the insert.
				$db->setQuery($query);

				try
				{
					$db->execute();
				}
				catch (RuntimeException $e)
				{
					JError::raiseWarning(500, $e->getMessage());

					return false;
				}
			}
			else
			{
				if ($userIP != $rating->lastip)
				{
					$query = $db->getQuery(true);

					// Create the base update statement.
					$query->update($db->quoteName('#__content_rating'))
						->set($db->quoteName('rating_count') . ' =
rating_count + 1')
						->set($db->quoteName('rating_sum') . ' =
rating_sum + ' . (int) $rate)
						->set($db->quoteName('lastip') . ' = ' .
$db->quote($userIP))
						->where($db->quoteName('content_id') . ' =
' . (int) $pk);

					// Set the query and execute the update.
					$db->setQuery($query);

					try
					{
						$db->execute();
					}
					catch (RuntimeException $e)
					{
						JError::raiseWarning(500, $e->getMessage());

						return false;
					}
				}
				else
				{
					return false;
				}
			}

			$this->cleanCache();

			return true;
		}

		JError::raiseWarning(500,
JText::sprintf('COM_CONTENT_INVALID_RATING', $rate),
"JModelArticle::storeVote($rate)");

		return false;
	}

	/**
	 * Cleans the cache of com_content and content modules
	 *
	 * @param   string   $group     The cache group
	 * @param   integer  $clientId  The ID of the client
	 *
	 * @return  void
	 *
	 * @since   3.9.9
	 */
	protected function cleanCache($group = null, $clientId = 0)
	{
		parent::cleanCache('com_content');
		parent::cleanCache('mod_articles_archive');
		parent::cleanCache('mod_articles_categories');
		parent::cleanCache('mod_articles_category');
		parent::cleanCache('mod_articles_latest');
		parent::cleanCache('mod_articles_news');
		parent::cleanCache('mod_articles_popular');
	}
}
PK��[a��ܐY�Ymodels/articles.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;

JLoader::register('ContentHelperAssociation', JPATH_SITE .
'/components/com_content/helpers/association.php');

/**
 * This models supports retrieving lists of articles.
 *
 * @since  1.6
 */
class ContentModelArticles extends JModelList
{
	/**
	 * Constructor.
	 *
	 * @param   array  $config  An optional associative array of configuration
settings.
	 *
	 * @see     JController
	 * @since   1.6
	 */
	public function __construct($config = array())
	{
		if (empty($config['filter_fields']))
		{
			$config['filter_fields'] = array(
				'id', 'a.id',
				'title', 'a.title',
				'alias', 'a.alias',
				'checked_out', 'a.checked_out',
				'checked_out_time', 'a.checked_out_time',
				'catid', 'a.catid', 'category_title',
				'state', 'a.state',
				'access', 'a.access', 'access_level',
				'created', 'a.created',
				'created_by', 'a.created_by',
				'ordering', 'a.ordering',
				'featured', 'a.featured',
				'language', 'a.language',
				'hits', 'a.hits',
				'publish_up', 'a.publish_up',
				'publish_down', 'a.publish_down',
				'images', 'a.images',
				'urls', 'a.urls',
				'filter_tag',
			);
		}

		parent::__construct($config);
	}

	/**
	 * Method to auto-populate the model state.
	 *
	 * This method should only be called once per instantiation and is
designed
	 * to be called on the first call to the getState() method unless the
model
	 * configuration flag to ignore the request is set.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @param   string  $ordering   An optional ordering field.
	 * @param   string  $direction  An optional direction (asc|desc).
	 *
	 * @return  void
	 *
	 * @since   3.0.1
	 */
	protected function populateState($ordering = 'ordering',
$direction = 'ASC')
	{
		$app = JFactory::getApplication();

		// List state information
		$value = $app->input->get('limit',
$app->get('list_limit', 0), 'uint');
		$this->setState('list.limit', $value);

		$value = $app->input->get('limitstart', 0,
'uint');
		$this->setState('list.start', $value);

		$value = $app->input->get('filter_tag', 0,
'uint');
		$this->setState('filter.tag', $value);

		$orderCol = $app->input->get('filter_order',
'a.ordering');

		if (!in_array($orderCol, $this->filter_fields))
		{
			$orderCol = 'a.ordering';
		}

		$this->setState('list.ordering', $orderCol);

		$listOrder = $app->input->get('filter_order_Dir',
'ASC');

		if (!in_array(strtoupper($listOrder), array('ASC',
'DESC', '')))
		{
			$listOrder = 'ASC';
		}

		$this->setState('list.direction', $listOrder);

		$params = $app->getParams();
		$this->setState('params', $params);
		$user = JFactory::getUser();

		if ((!$user->authorise('core.edit.state',
'com_content')) &&
(!$user->authorise('core.edit', 'com_content')))
		{
			// Filter on published for those who do not have edit or edit.state
rights.
			$this->setState('filter.published', 1);
		}

		$this->setState('filter.language',
JLanguageMultilang::isEnabled());

		// Process show_noauth parameter
		if ((!$params->get('show_noauth')) ||
(!JComponentHelper::getParams('com_content')->get('show_noauth')))
		{
			$this->setState('filter.access', true);
		}
		else
		{
			$this->setState('filter.access', false);
		}

		$this->setState('layout',
$app->input->getString('layout'));
	}

	/**
	 * Method to get a store id based on model configuration state.
	 *
	 * This is necessary because the model is used by the component and
	 * different modules that might need different sets of data or different
	 * ordering requirements.
	 *
	 * @param   string  $id  A prefix for the store id.
	 *
	 * @return  string  A store id.
	 *
	 * @since   1.6
	 */
	protected function getStoreId($id = '')
	{
		// Compile the store id.
		$id .= ':' .
serialize($this->getState('filter.published'));
		$id .= ':' . $this->getState('filter.access');
		$id .= ':' . $this->getState('filter.featured');
		$id .= ':' .
serialize($this->getState('filter.article_id'));
		$id .= ':' .
$this->getState('filter.article_id.include');
		$id .= ':' .
serialize($this->getState('filter.category_id'));
		$id .= ':' .
$this->getState('filter.category_id.include');
		$id .= ':' .
serialize($this->getState('filter.author_id'));
		$id .= ':' .
$this->getState('filter.author_id.include');
		$id .= ':' .
serialize($this->getState('filter.author_alias'));
		$id .= ':' .
$this->getState('filter.author_alias.include');
		$id .= ':' .
$this->getState('filter.date_filtering');
		$id .= ':' . $this->getState('filter.date_field');
		$id .= ':' .
$this->getState('filter.start_date_range');
		$id .= ':' .
$this->getState('filter.end_date_range');
		$id .= ':' .
$this->getState('filter.relative_date');
		$id .= ':' .
serialize($this->getState('filter.tag'));

		return parent::getStoreId($id);
	}

	/**
	 * Get the master query for retrieving a list of articles subject to the
model state.
	 *
	 * @return  JDatabaseQuery
	 *
	 * @since   1.6
	 */
	protected function getListQuery()
	{
		// Get the current user for authorisation checks
		$user = JFactory::getUser();

		// Create a new query object.
		$db    = $this->getDbo();
		$query = $db->getQuery(true);

		// Select the required fields from the table.
		$query->select(
			$this->getState(
				'list.select',
				'a.id, a.title, a.alias, a.introtext, a.fulltext, ' .
				'a.checked_out, a.checked_out_time, ' .
				'a.catid, a.created, a.created_by, a.created_by_alias, ' .
				// Published/archived article in archive category is treats as archive
article
				// If category is not published then force 0
				'CASE WHEN c.published = 2 AND a.state > 0 THEN 2 WHEN
c.published != 1 THEN 0 ELSE a.state END as state,' .
				// Use created if modified is 0
				'CASE WHEN a.modified = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.modified END as modified, ' .
				'a.modified_by, uam.name as modified_by_name,' .
				// Use created if publish_up is 0
				'CASE WHEN a.publish_up = ' .
$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.publish_up END as publish_up,' .
				'a.publish_down, a.images, a.urls, a.attribs, a.metadata,
a.metakey, a.metadesc, a.access, ' .
				'a.hits, a.xreference, a.featured, a.language, ' . '
' . $query->length('a.fulltext') . ' AS readmore,
a.ordering'
			)
		);

		$query->from('#__content AS a');

		$params      = $this->getState('params');
		$orderby_sec = $params->get('orderby_sec');

		// Join over the frontpage articles if required.
		if ($this->getState('filter.frontpage'))
		{
			if ($orderby_sec === 'front')
			{
				$query->select('fp.ordering');
				$query->join('INNER', '#__content_frontpage AS fp ON
fp.content_id = a.id');
			}
			else
			{
				$query->where('a.featured = 1');
			}
		}
		elseif ($orderby_sec === 'front' ||
$this->getState('list.ordering') === 'fp.ordering')
		{
			$query->select('fp.ordering');
			$query->join('LEFT', '#__content_frontpage AS fp ON
fp.content_id = a.id');
		}

		// Join over the categories.
		$query->select('c.title AS category_title, c.path AS
category_route, c.access AS category_access, c.alias AS
category_alias')
			->select('c.published, c.published AS parents_published,
c.lft')
			->join('LEFT', '#__categories AS c ON c.id =
a.catid');

		// Join over the users for the author and modified_by names.
		$query->select("CASE WHEN a.created_by_alias > ' '
THEN a.created_by_alias ELSE ua.name END AS author")
			->select('ua.email AS author_email')
			->join('LEFT', '#__users AS ua ON ua.id =
a.created_by')
			->join('LEFT', '#__users AS uam ON uam.id =
a.modified_by');

		// Join over the categories to get parent category titles
		$query->select('parent.title as parent_title, parent.id as
parent_id, parent.path as parent_route, parent.alias as parent_alias')
			->join('LEFT', '#__categories as parent ON parent.id =
c.parent_id');

		if (JPluginHelper::isEnabled('content', 'vote'))
		{
			// Join on voting table
			$query->select('COALESCE(NULLIF(ROUND(v.rating_sum  /
v.rating_count, 0), 0), 0) AS rating,
							COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
				->join('LEFT', '#__content_rating AS v ON a.id =
v.content_id');
		}

		// Filter by access level.
		if ($this->getState('filter.access', true))
		{
			$groups = implode(',', $user->getAuthorisedViewLevels());
			$query->where('a.access IN (' . $groups . ')')
				->where('c.access IN (' . $groups . ')');
		}

		// Filter by published state
		$published = $this->getState('filter.published');

		if (is_numeric($published) && $published == 2)
		{
			/**
			 * If category is archived then article has to be published or archived.
			 * Or categogy is published then article has to be archived.
			 */
			$query->where('((c.published = 2 AND a.state > 0) OR
(c.published = 1 AND a.state = 2))');
		}
		elseif (is_numeric($published))
		{
			// Category has to be published
			$query->where('c.published = 1 AND a.state = ' . (int)
$published);
		}
		elseif (is_array($published))
		{
			$published = ArrayHelper::toInteger($published);
			$published = implode(',', $published);

			// Category has to be published
			$query->where('c.published = 1 AND a.state IN (' .
$published . ')');
		}

		// Filter by featured state
		$featured = $this->getState('filter.featured');

		switch ($featured)
		{
			case 'hide':
				$query->where('a.featured = 0');
				break;

			case 'only':
				$query->where('a.featured = 1');
				break;

			case 'show':
			default:
				// Normally we do not discriminate between featured/unfeatured items.
				break;
		}

		// Filter by a single or group of articles.
		$articleId = $this->getState('filter.article_id');

		if (is_numeric($articleId))
		{
			$type = $this->getState('filter.article_id.include', true)
? '= ' : '<> ';
			$query->where('a.id ' . $type . (int) $articleId);
		}
		elseif (is_array($articleId))
		{
			$articleId = ArrayHelper::toInteger($articleId);
			$articleId = implode(',', $articleId);
			$type      = $this->getState('filter.article_id.include',
true) ? 'IN' : 'NOT IN';
			$query->where('a.id ' . $type . ' (' . $articleId
. ')');
		}

		// Filter by a single or group of categories
		$categoryId = $this->getState('filter.category_id');

		if (is_numeric($categoryId))
		{
			$type = $this->getState('filter.category_id.include', true)
? '= ' : '<> ';

			// Add subcategory check
			$includeSubcategories =
$this->getState('filter.subcategories', false);
			$categoryEquals       = 'a.catid ' . $type . (int)
$categoryId;

			if ($includeSubcategories)
			{
				$levels = (int)
$this->getState('filter.max_category_levels', '1');

				// Create a subquery for the subcategory list
				$subQuery = $db->getQuery(true)
					->select('sub.id')
					->from('#__categories as sub')
					->join('INNER', '#__categories as this ON sub.lft
> this.lft AND sub.rgt < this.rgt')
					->where('this.id = ' . (int) $categoryId);

				if ($levels >= 0)
				{
					$subQuery->where('sub.level <= this.level + ' .
$levels);
				}

				// Add the subquery to the main query
				$query->where('(' . $categoryEquals . ' OR a.catid IN
(' . (string) $subQuery . '))');
			}
			else
			{
				$query->where($categoryEquals);
			}
		}
		elseif (is_array($categoryId) && (count($categoryId) > 0))
		{
			$categoryId = ArrayHelper::toInteger($categoryId);
			$categoryId = implode(',', $categoryId);

			if (!empty($categoryId))
			{
				$type = $this->getState('filter.category_id.include',
true) ? 'IN' : 'NOT IN';
				$query->where('a.catid ' . $type . ' (' .
$categoryId . ')');
			}
		}

		// Filter by author
		$authorId    = $this->getState('filter.author_id');
		$authorWhere = '';

		if (is_numeric($authorId))
		{
			$type        = $this->getState('filter.author_id.include',
true) ? '= ' : '<> ';
			$authorWhere = 'a.created_by ' . $type . (int) $authorId;
		}
		elseif (is_array($authorId))
		{
			$authorId = array_filter($authorId, 'is_numeric');

			if ($authorId)
			{
				$authorId    = implode(',', $authorId);
				$type        = $this->getState('filter.author_id.include',
true) ? 'IN' : 'NOT IN';
				$authorWhere = 'a.created_by ' . $type . ' (' .
$authorId . ')';
			}
		}

		// Filter by author alias
		$authorAlias      = $this->getState('filter.author_alias');
		$authorAliasWhere = '';

		if (is_string($authorAlias))
		{
			$type             =
$this->getState('filter.author_alias.include', true) ? '=
' : '<> ';
			$authorAliasWhere = 'a.created_by_alias ' . $type .
$db->quote($authorAlias);
		}
		elseif (is_array($authorAlias))
		{
			$first = current($authorAlias);

			if (!empty($first))
			{
				foreach ($authorAlias as $key => $alias)
				{
					$authorAlias[$key] = $db->quote($alias);
				}

				$authorAlias = implode(',', $authorAlias);

				if ($authorAlias)
				{
					$type             =
$this->getState('filter.author_alias.include', true) ?
'IN' : 'NOT IN';
					$authorAliasWhere = 'a.created_by_alias ' . $type . '
(' . $authorAlias .
						')';
				}
			}
		}

		if (!empty($authorWhere) && !empty($authorAliasWhere))
		{
			$query->where('(' . $authorWhere . ' OR ' .
$authorAliasWhere . ')');
		}
		elseif (empty($authorWhere) && empty($authorAliasWhere))
		{
			// If both are empty we don't want to add to the query
		}
		else
		{
			// One of these is empty, the other is not so we just add both
			$query->where($authorWhere . $authorAliasWhere);
		}

		// Define null and now dates
		$nullDate = $db->quote($db->getNullDate());
		$nowDate  = $db->quote(JFactory::getDate()->toSql());

		// Filter by start and end dates.
		if ((!$user->authorise('core.edit.state',
'com_content')) &&
(!$user->authorise('core.edit', 'com_content')))
		{
			$query->where('(a.publish_up = ' . $nullDate . ' OR
a.publish_up <= ' . $nowDate . ')')
				->where('(a.publish_down = ' . $nullDate . ' OR
a.publish_down >= ' . $nowDate . ')');
		}

		// Filter by Date Range or Relative Date
		$dateFiltering = $this->getState('filter.date_filtering',
'off');
		$dateField     = $this->getState('filter.date_field',
'a.created');

		switch ($dateFiltering)
		{
			case 'range':
				$startDateRange =
$db->quote($this->getState('filter.start_date_range',
$nullDate));
				$endDateRange   =
$db->quote($this->getState('filter.end_date_range',
$nullDate));
				$query->where(
					'(' . $dateField . ' >= ' . $startDateRange .
' AND ' . $dateField .
					' <= ' . $endDateRange . ')'
				);
				break;

			case 'relative':
				$relativeDate = (int)
$this->getState('filter.relative_date', 0);
				$query->where(
					$dateField . ' >= ' . $query->dateAdd($nowDate, -1 *
$relativeDate, 'DAY')
				);
				break;

			case 'off':
			default:
				break;
		}

		// Process the filter for list views with user-entered filters
		if (is_object($params) &&
($params->get('filter_field') !== 'hide') &&
($filter = $this->getState('list.filter')))
		{
			// Clean filter variable
			$filter      = StringHelper::strtolower($filter);
			$monthFilter = $filter;
			$hitsFilter  = (int) $filter;
			$filter      = $db->quote('%' . $db->escape($filter,
true) . '%', false);

			switch ($params->get('filter_field'))
			{
				case 'author':
					$query->where(
						'LOWER( CASE WHEN a.created_by_alias > ' .
$db->quote(' ') .
						' THEN a.created_by_alias ELSE ua.name END ) LIKE ' .
$filter . ' '
					);
					break;

				case 'hits':
					$query->where('a.hits >= ' . $hitsFilter . '
');
					break;

				case 'month':
					if ($monthFilter != '')
					{
						$query->where(
							$db->quote(date("Y-m-d", strtotime($monthFilter)) .
' 00:00:00') . ' <= CASE WHEN a.publish_up = ' .
							$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.publish_up END'
						);

						$query->where(
							$db->quote(date("Y-m-t", strtotime($monthFilter)) .
' 23:59:59') . ' >= CASE WHEN a.publish_up = ' .
							$db->quote($db->getNullDate()) . ' THEN a.created ELSE
a.publish_up END'
						);
					}
					break;

				case 'title':
				default:
					// Default to 'title' if parameter is not valid
					$query->where('LOWER( a.title ) LIKE ' . $filter);
					break;
			}
		}

		// Filter by language
		if ($this->getState('filter.language'))
		{
			$query->where('a.language IN (' .
$db->quote(JFactory::getLanguage()->getTag()) . ',' .
$db->quote('*') . ')');
		}

		// Filter by a single or group of tags.
		$tagId = $this->getState('filter.tag');

		if (is_array($tagId) && count($tagId) === 1)
		{
			$tagId = current($tagId);
		}

		if (is_array($tagId))
		{
			$tagId = implode(',', ArrayHelper::toInteger($tagId));

			if ($tagId)
			{
				$subQuery = $db->getQuery(true)
					->select('DISTINCT content_item_id')
					->from($db->quoteName('#__contentitem_tag_map'))
					->where('tag_id IN (' . $tagId . ')')
					->where('type_alias = ' .
$db->quote('com_content.article'));

				$query->innerJoin('(' . (string) $subQuery . ') AS
tagmap ON tagmap.content_item_id = a.id');
			}
		}
		elseif ($tagId)
		{
			$query->innerJoin(
				$db->quoteName('#__contentitem_tag_map',
'tagmap')
				. ' ON tagmap.tag_id = ' . (int) $tagId
				. ' AND tagmap.content_item_id = a.id'
				. ' AND tagmap.type_alias = ' .
$db->quote('com_content.article')
			);
		}

		// Add the list ordering clause.
		$query->order($this->getState('list.ordering',
'a.ordering') . ' ' .
$this->getState('list.direction', 'ASC'));

		return $query;
	}

	/**
	 * Method to get a list of articles.
	 *
	 * Overridden to inject convert the attribs field into a JParameter
object.
	 *
	 * @return  mixed  An array of objects on success, false on failure.
	 *
	 * @since   1.6
	 */
	public function getItems()
	{
		$items  = parent::getItems();
		$user   = JFactory::getUser();
		$userId = $user->get('id');
		$guest  = $user->get('guest');
		$groups = $user->getAuthorisedViewLevels();
		$input  = JFactory::getApplication()->input;

		// Get the global params
		$globalParams = JComponentHelper::getParams('com_content',
true);

		// Convert the parameter fields into objects.
		foreach ($items as &$item)
		{
			$articleParams = new Registry($item->attribs);

			// Unpack readmore and layout params
			$item->alternative_readmore =
$articleParams->get('alternative_readmore');
			$item->layout               =
$articleParams->get('layout');

			$item->params = clone $this->getState('params');

			/**
			 * For blogs, article params override menu item params only if menu
param = 'use_article'
			 * Otherwise, menu item params control the layout
			 * If menu item is 'use_article' and there is no article
param, use global
			 */
			if (($input->getString('layout') === 'blog') ||
($input->getString('view') === 'featured')
				||
($this->getState('params')->get('layout_type')
=== 'blog'))
			{
				// Create an array of just the params set to 'use_article'
				$menuParamsArray =
$this->getState('params')->toArray();
				$articleArray    = array();

				foreach ($menuParamsArray as $key => $value)
				{
					if ($value === 'use_article')
					{
						// If the article has a value, use it
						if ($articleParams->get($key) != '')
						{
							// Get the value from the article
							$articleArray[$key] = $articleParams->get($key);
						}
						else
						{
							// Otherwise, use the global value
							$articleArray[$key] = $globalParams->get($key);
						}
					}
				}

				// Merge the selected article params
				if (count($articleArray) > 0)
				{
					$articleParams = new Registry($articleArray);
					$item->params->merge($articleParams);
				}
			}
			else
			{
				// For non-blog layouts, merge all of the article params
				$item->params->merge($articleParams);
			}

			// Get display date
			switch ($item->params->get('list_show_date'))
			{
				case 'modified':
					$item->displayDate = $item->modified;
					break;

				case 'published':
					$item->displayDate = ($item->publish_up == 0) ?
$item->created : $item->publish_up;
					break;

				default:
				case 'created':
					$item->displayDate = $item->created;
					break;
			}

			/**
			 * Compute the asset access permissions.
			 * Technically guest could edit an article, but lets not check that to
improve performance a little.
			 */
			if (!$guest)
			{
				$asset = 'com_content.article.' . $item->id;

				// Check general edit permission first.
				if ($user->authorise('core.edit', $asset))
				{
					$item->params->set('access-edit', true);
				}

				// Now check if edit.own is available.
				elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset))
				{
					// Check for a valid user and that they are the owner.
					if ($userId == $item->created_by)
					{
						$item->params->set('access-edit', true);
					}
				}
			}

			$access = $this->getState('filter.access');

			if ($access)
			{
				// If the access filter has been set, we already have only the articles
this user can view.
				$item->params->set('access-view', true);
			}
			else
			{
				// If no access filter is set, the layout takes some responsibility for
display of limited information.
				if ($item->catid == 0 || $item->category_access === null)
				{
					$item->params->set('access-view',
in_array($item->access, $groups));
				}
				else
				{
					$item->params->set('access-view',
in_array($item->access, $groups) &&
in_array($item->category_access, $groups));
				}
			}

			// Some contexts may not use tags data at all, so we allow callers to
disable loading tag data
			if ($this->getState('load_tags',
$item->params->get('show_tags', '1')))
			{
				$item->tags = new JHelperTags;
				$item->tags->getItemTags('com_content.article',
$item->id);
			}

			if ($item->params->get('show_associations'))
			{
				$item->associations =
ContentHelperAssociation::displayAssociations($item->id);
			}
		}

		return $items;
	}

	/**
	 * Method to get the starting number of items for the data set.
	 *
	 * @return  integer  The starting number of items available in the data
set.
	 *
	 * @since   3.0.1
	 */
	public function getStart()
	{
		return $this->getState('list.start');
	}

	/**
	 * Count Items by Month
	 *
	 * @return  mixed  An array of objects on success, false on failure.
	 *
	 * @since   3.9.0
	 */
	public function countItemsByMonth()
	{
		// Create a new query object.
		$db    = $this->getDbo();
		$query = $db->getQuery(true);

		$query
			->select('DATE(' .
				$query->concatenate(
					array(
						$query->year($query->quoteName('publish_up')),
						$query->quote('-'),
						$query->month($query->quoteName('publish_up')),
						$query->quote('-01')
					)
				) . ') as d'
			)
			->select('COUNT(*) as c')
			->from('(' . $this->getListQuery() . ') as b')
			->group($query->quoteName('d'))
			->order($query->quoteName('d') . ' desc');

		return $db->setQuery($query)->loadObjectList();
	}
}
PK��[��l�
�
models/categories.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

/**
 * This models supports retrieving lists of article categories.
 *
 * @since  1.6
 */
class ContentModelCategories extends JModelList
{
	/**
	 * Model context string.
	 *
	 * @var		string
	 */
	public $_context = 'com_content.categories';

	/**
	 * The category context (allows other extensions to derived from this
model).
	 *
	 * @var		string
	 */
	protected $_extension = 'com_content';

	private $_parent = null;

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @param   string  $ordering   The field to order on.
	 * @param   string  $direction  The direction to order on.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		$app = JFactory::getApplication();
		$this->setState('filter.extension', $this->_extension);

		// Get the parent id if defined.
		$parentId = $app->input->getInt('id');
		$this->setState('filter.parentId', $parentId);

		$params = $app->getParams();
		$this->setState('params', $params);

		$this->setState('filter.published',	1);
		$this->setState('filter.access',	true);
	}

	/**
	 * Method to get a store id based on model configuration state.
	 *
	 * This is necessary because the model is used by the component and
	 * different modules that might need different sets of data or different
	 * ordering requirements.
	 *
	 * @param   string  $id  A prefix for the store id.
	 *
	 * @return  string  A store id.
	 */
	protected function getStoreId($id = '')
	{
		// Compile the store id.
		$id	.= ':' . $this->getState('filter.extension');
		$id	.= ':' . $this->getState('filter.published');
		$id	.= ':' . $this->getState('filter.access');
		$id	.= ':' . $this->getState('filter.parentId');

		return parent::getStoreId($id);
	}

	/**
	 * Redefine the function an add some properties to make the styling more
easy
	 *
	 * @param   bool  $recursive  True if you want to return children
recursively.
	 *
	 * @return  mixed  An array of data items on success, false on failure.
	 *
	 * @since   1.6
	 */
	public function getItems($recursive = false)
	{
		$store = $this->getStoreId();

		if (!isset($this->cache[$store]))
		{
			$app = JFactory::getApplication();
			$menu = $app->getMenu();
			$active = $menu->getActive();
			$params = new Registry;

			if ($active)
			{
				$params->loadString($active->params);
			}

			$options = array();
			$options['countItems'] =
$params->get('show_cat_num_articles_cat', 1) ||
!$params->get('show_empty_categories_cat', 0);
			$categories = JCategories::getInstance('Content', $options);
			$this->_parent =
$categories->get($this->getState('filter.parentId',
'root'));

			if (is_object($this->_parent))
			{
				$this->cache[$store] =
$this->_parent->getChildren($recursive);
			}
			else
			{
				$this->cache[$store] = false;
			}
		}

		return $this->cache[$store];
	}

	/**
	 * Get the parent.
	 *
	 * @return  object  An array of data items on success, false on failure.
	 *
	 * @since   1.6
	 */
	public function getParent()
	{
		if (!is_object($this->_parent))
		{
			$this->getItems();
		}

		return $this->_parent;
	}
}
PK��[95
�d1d1models/category.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

/**
 * This models supports retrieving a category, the articles associated with
the category,
 * sibling, child and parent categories.
 *
 * @since  1.5
 */
class ContentModelCategory extends JModelList
{
	/**
	 * Category items data
	 *
	 * @var array
	 */
	protected $_item = null;

	protected $_articles = null;

	protected $_siblings = null;

	protected $_children = null;

	protected $_parent = null;

	/**
	 * Model context string.
	 *
	 * @var		string
	 */
	protected $_context = 'com_content.category';

	/**
	 * The category that applies.
	 *
	 * @access	protected
	 * @var		object
	 */
	protected $_category = null;

	/**
	 * The list of other newfeed categories.
	 *
	 * @access	protected
	 * @var		array
	 */
	protected $_categories = null;

	/**
	 * Constructor.
	 *
	 * @param   array  $config  An optional associative array of configuration
settings.
	 *
	 * @since   1.6
	 */
	public function __construct($config = array())
	{
		if (empty($config['filter_fields']))
		{
			$config['filter_fields'] = array(
				'id', 'a.id',
				'title', 'a.title',
				'alias', 'a.alias',
				'checked_out', 'a.checked_out',
				'checked_out_time', 'a.checked_out_time',
				'catid', 'a.catid', 'category_title',
				'state', 'a.state',
				'access', 'a.access', 'access_level',
				'created', 'a.created',
				'created_by', 'a.created_by',
				'modified', 'a.modified',
				'ordering', 'a.ordering',
				'featured', 'a.featured',
				'language', 'a.language',
				'hits', 'a.hits',
				'publish_up', 'a.publish_up',
				'publish_down', 'a.publish_down',
				'author', 'a.author',
				'filter_tag'
			);
		}

		parent::__construct($config);
	}

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @param   string  $ordering   The field to order on.
	 * @param   string  $direction  The direction to order on.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		$app = JFactory::getApplication('site');
		$pk  = $app->input->getInt('id');

		$this->setState('category.id', $pk);

		// Load the parameters. Merge Global and Menu Item params into new object
		$params = $app->getParams();
		$menuParams = new Registry;

		if ($menu = $app->getMenu()->getActive())
		{
			$menuParams->loadString($menu->params);
		}

		$mergedParams = clone $menuParams;
		$mergedParams->merge($params);

		$this->setState('params', $mergedParams);
		$user  = JFactory::getUser();

		$asset = 'com_content';

		if ($pk)
		{
			$asset .= '.category.' . $pk;
		}

		if ((!$user->authorise('core.edit.state', $asset))
&&  (!$user->authorise('core.edit', $asset)))
		{
			// Limit to published for people who can't edit or edit.state.
			$this->setState('filter.published', 1);
		}
		else
		{
			$this->setState('filter.published', array(0, 1, 2));
		}

		// Process show_noauth parameter
		if (!$params->get('show_noauth'))
		{
			$this->setState('filter.access', true);
		}
		else
		{
			$this->setState('filter.access', false);
		}

		$itemid = $app->input->get('id', 0, 'int') .
':' . $app->input->get('Itemid', 0,
'int');

		$value =
$this->getUserStateFromRequest('com_content.category.filter.'
. $itemid . '.tag', 'filter_tag', 0, 'int',
false);
		$this->setState('filter.tag', $value);

		// Optional filter text
		$search =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter-search', 'filter-search',
'', 'string');
		$this->setState('list.filter', $search);

		// Filter.order
		$orderCol =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order', 'filter_order',
'', 'string');

		if (!in_array($orderCol, $this->filter_fields))
		{
			$orderCol = 'a.ordering';
		}

		$this->setState('list.ordering', $orderCol);

		$listOrder =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order_Dir', 'filter_order_Dir',
'', 'cmd');

		if (!in_array(strtoupper($listOrder), array('ASC',
'DESC', '')))
		{
			$listOrder = 'ASC';
		}

		$this->setState('list.direction', $listOrder);

		$this->setState('list.start',
$app->input->get('limitstart', 0, 'uint'));

		// Set limit for query. If list, use parameter. If blog, add blog
parameters for limit.
		if (($app->input->get('layout') === 'blog') ||
$params->get('layout_type') === 'blog')
		{
			$limit = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');
			$this->setState('list.links',
$params->get('num_links'));
		}
		else
		{
			$limit =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.limit', 'limit',
$params->get('display_num'), 'uint');
		}

		$this->setState('list.limit', $limit);

		// Set the depth of the category query based on parameter
		$showSubcategories =
$params->get('show_subcategory_content', '0');

		if ($showSubcategories)
		{
			$this->setState('filter.max_category_levels',
$params->get('show_subcategory_content', '1'));
			$this->setState('filter.subcategories', true);
		}

		$this->setState('filter.language',
JLanguageMultilang::isEnabled());

		$this->setState('layout',
$app->input->getString('layout'));

		// Set the featured articles state
		$this->setState('filter.featured',
$params->get('show_featured'));
	}

	/**
	 * Get the articles in the category
	 *
	 * @return  mixed  An array of articles or false if an error occurs.
	 *
	 * @since   1.5
	 */
	public function getItems()
	{
		$limit = $this->getState('list.limit');

		if ($this->_articles === null && $category =
$this->getCategory())
		{
			$model = JModelLegacy::getInstance('Articles',
'ContentModel', array('ignore_request' => true));
			$model->setState('params',
JFactory::getApplication()->getParams());
			$model->setState('filter.category_id', $category->id);
			$model->setState('filter.published',
$this->getState('filter.published'));
			$model->setState('filter.access',
$this->getState('filter.access'));
			$model->setState('filter.language',
$this->getState('filter.language'));
			$model->setState('filter.featured',
$this->getState('filter.featured'));
			$model->setState('list.ordering',
$this->_buildContentOrderBy());
			$model->setState('list.start',
$this->getState('list.start'));
			$model->setState('list.limit', $limit);
			$model->setState('list.direction',
$this->getState('list.direction'));
			$model->setState('list.filter',
$this->getState('list.filter'));
			$model->setState('filter.tag',
$this->getState('filter.tag'));

			// Filter.subcategories indicates whether to include articles from
subcategories in the list or blog
			$model->setState('filter.subcategories',
$this->getState('filter.subcategories'));
			$model->setState('filter.max_category_levels',
$this->getState('filter.max_category_levels'));
			$model->setState('list.links',
$this->getState('list.links'));

			if ($limit >= 0)
			{
				$this->_articles = $model->getItems();

				if ($this->_articles === false)
				{
					$this->setError($model->getError());
				}
			}
			else
			{
				$this->_articles = array();
			}

			$this->_pagination = $model->getPagination();
		}

		return $this->_articles;
	}

	/**
	 * Build the orderby for the query
	 *
	 * @return  string	$orderby portion of query
	 *
	 * @since   1.5
	 */
	protected function _buildContentOrderBy()
	{
		$app       = JFactory::getApplication('site');
		$db        = $this->getDbo();
		$params    = $this->state->params;
		$itemid    = $app->input->get('id', 0, 'int') .
':' . $app->input->get('Itemid', 0,
'int');
		$orderCol  =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order', 'filter_order',
'', 'string');
		$orderDirn =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order_Dir', 'filter_order_Dir',
'', 'cmd');
		$orderby   = ' ';

		if (!in_array($orderCol, $this->filter_fields))
		{
			$orderCol = null;
		}

		if (!in_array(strtoupper($orderDirn), array('ASC',
'DESC', '')))
		{
			$orderDirn = 'ASC';
		}

		if ($orderCol && $orderDirn)
		{
			$orderby .= $db->escape($orderCol) . ' ' .
$db->escape($orderDirn) . ', ';
		}

		$articleOrderby   = $params->get('orderby_sec',
'rdate');
		$articleOrderDate = $params->get('order_date');
		$categoryOrderby  = $params->def('orderby_pri',
'');
		$secondary        = ContentHelperQuery::orderbySecondary($articleOrderby,
$articleOrderDate) . ', ';
		$primary          = ContentHelperQuery::orderbyPrimary($categoryOrderby);

		$orderby .= $primary . ' ' . $secondary . ' a.created
';

		return $orderby;
	}

	/**
	 * Method to get a JPagination object for the data set.
	 *
	 * @return  JPagination  A JPagination object for the data set.
	 *
	 * @since   3.0.1
	 */
	public function getPagination()
	{
		if (empty($this->_pagination))
		{
			return null;
		}

		return $this->_pagination;
	}

	/**
	 * Method to get category data for the current category
	 *
	 * @return  object
	 *
	 * @since   1.5
	 */
	public function getCategory()
	{
		if (!is_object($this->_item))
		{
			if (isset($this->state->params))
			{
				$params = $this->state->params;
				$options = array();
				$options['countItems'] =
$params->get('show_cat_num_articles', 1) ||
!$params->get('show_empty_categories_cat', 0);
				$options['access']     =
$params->get('check_access_rights', 1);
			}
			else
			{
				$options['countItems'] = 0;
			}

			$categories = JCategories::getInstance('Content', $options);
			$this->_item =
$categories->get($this->getState('category.id',
'root'));

			// Compute selected asset permissions.
			if (is_object($this->_item))
			{
				$user  = JFactory::getUser();
				$asset = 'com_content.category.' . $this->_item->id;

				// Check general create permission.
				if ($user->authorise('core.create', $asset))
				{
					$this->_item->getParams()->set('access-create',
true);
				}

				// TODO: Why aren't we lazy loading the children and siblings?
				$this->_children = $this->_item->getChildren();
				$this->_parent = false;

				if ($this->_item->getParent())
				{
					$this->_parent = $this->_item->getParent();
				}

				$this->_rightsibling = $this->_item->getSibling();
				$this->_leftsibling = $this->_item->getSibling(false);
			}
			else
			{
				$this->_children = false;
				$this->_parent = false;
			}
		}

		return $this->_item;
	}

	/**
	 * Get the parent category.
	 *
	 * @return  mixed  An array of categories or false if an error occurs.
	 *
	 * @since   1.6
	 */
	public function getParent()
	{
		if (!is_object($this->_item))
		{
			$this->getCategory();
		}

		return $this->_parent;
	}

	/**
	 * Get the left sibling (adjacent) categories.
	 *
	 * @return  mixed  An array of categories or false if an error occurs.
	 *
	 * @since   1.6
	 */
	public function &getLeftSibling()
	{
		if (!is_object($this->_item))
		{
			$this->getCategory();
		}

		return $this->_leftsibling;
	}

	/**
	 * Get the right sibling (adjacent) categories.
	 *
	 * @return  mixed  An array of categories or false if an error occurs.
	 *
	 * @since   1.6
	 */
	public function &getRightSibling()
	{
		if (!is_object($this->_item))
		{
			$this->getCategory();
		}

		return $this->_rightsibling;
	}

	/**
	 * Get the child categories.
	 *
	 * @return  mixed  An array of categories or false if an error occurs.
	 *
	 * @since   1.6
	 */
	public function &getChildren()
	{
		if (!is_object($this->_item))
		{
			$this->getCategory();
		}

		// Order subcategories
		if ($this->_children)
		{
			$params = $this->getState()->get('params');

			$orderByPri = $params->get('orderby_pri');

			if ($orderByPri === 'alpha' || $orderByPri ===
'ralpha')
			{
				$this->_children = ArrayHelper::sortObjects($this->_children,
'title', ($orderByPri === 'alpha') ? 1 : (-1));
			}
		}

		return $this->_children;
	}

	/**
	 * Increment the hit counter for the category.
	 *
	 * @param   int  $pk  Optional primary key of the category to increment.
	 *
	 * @return  boolean True if successful; false otherwise and internal error
set.
	 */
	public function hit($pk = 0)
	{
		$input = JFactory::getApplication()->input;
		$hitcount = $input->getInt('hitcount', 1);

		if ($hitcount)
		{
			$pk = (!empty($pk)) ? $pk : (int)
$this->getState('category.id');

			$table = JTable::getInstance('Category', 'JTable');
			$table->hit($pk);
		}

		return true;
	}
}
PK��[��;xppmodels/featured.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

JLoader::register('ContentModelArticles', __DIR__ .
'/articles.php');

/**
 * Frontpage Component Model
 *
 * @since  1.5
 */
class ContentModelFeatured extends ContentModelArticles
{
	/**
	 * Model context string.
	 *
	 * @var		string
	 */
	public $_context = 'com_content.frontpage';

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @param   string  $ordering   The field to order on.
	 * @param   string  $direction  The direction to order on.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		parent::populateState($ordering, $direction);

		$input = JFactory::getApplication()->input;
		$user  = JFactory::getUser();
		$app   = JFactory::getApplication('site');

		// List state information
		$limitstart = $input->getUInt('limitstart', 0);
		$this->setState('list.start', $limitstart);

		$params = $this->state->params;
		$menuParams = new Registry;

		if ($menu = $app->getMenu()->getActive())
		{
			$menuParams->loadString($menu->params);
		}

		$mergedParams = clone $menuParams;
		$mergedParams->merge($params);

		$this->setState('params', $mergedParams);

		$limit = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');
		$this->setState('list.limit', $limit);
		$this->setState('list.links',
$params->get('num_links'));

		$this->setState('filter.frontpage', true);

		if ((!$user->authorise('core.edit.state',
'com_content')) && 
(!$user->authorise('core.edit', 'com_content')))
		{
			// Filter on published for those who do not have edit or edit.state
rights.
			$this->setState('filter.published', 1);
		}
		else
		{
			$this->setState('filter.published', array(0, 1, 2));
		}

		// Process show_noauth parameter
		if (!$params->get('show_noauth'))
		{
			$this->setState('filter.access', true);
		}
		else
		{
			$this->setState('filter.access', false);
		}

		// Check for category selection
		if ($params->get('featured_categories') &&
implode(',', $params->get('featured_categories')) ==
true)
		{
			$featuredCategories = $params->get('featured_categories');
			$this->setState('filter.frontpage.categories',
$featuredCategories);
		}

		$articleOrderby   = $params->get('orderby_sec',
'rdate');
		$articleOrderDate = $params->get('order_date');
		$categoryOrderby  = $params->def('orderby_pri',
'');

		$secondary = ContentHelperQuery::orderbySecondary($articleOrderby,
$articleOrderDate);
		$primary   = ContentHelperQuery::orderbyPrimary($categoryOrderby);

		$this->setState('list.ordering', $primary . $secondary .
', a.created DESC');
		$this->setState('list.direction', '');
	}

	/**
	 * Method to get a list of articles.
	 *
	 * @return  mixed  An array of objects on success, false on failure.
	 */
	public function getItems()
	{
		$params = clone $this->getState('params');
		$limit = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');

		if ($limit > 0)
		{
			$this->setState('list.limit', $limit);

			return parent::getItems();
		}

		return array();
	}

	/**
	 * Method to get a store id based on model configuration state.
	 *
	 * This is necessary because the model is used by the component and
	 * different modules that might need different sets of data or different
	 * ordering requirements.
	 *
	 * @param   string  $id  A prefix for the store id.
	 *
	 * @return  string  A store id.
	 */
	protected function getStoreId($id = '')
	{
		// Compile the store id.
		$id .= $this->getState('filter.frontpage');

		return parent::getStoreId($id);
	}

	/**
	 * Get the list of items.
	 *
	 * @return  JDatabaseQuery
	 */
	protected function getListQuery()
	{
		// Create a new query object.
		$query = parent::getListQuery();

		// Filter by categories
		$featuredCategories =
$this->getState('filter.frontpage.categories');

		if (is_array($featuredCategories) && !in_array('',
$featuredCategories))
		{
			$query->where('a.catid IN (' . implode(',',
ArrayHelper::toInteger($featuredCategories)) . ')');
		}

		return $query;
	}
}
PK��[��O��models/form.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

// Base this model on the backend version.
JLoader::register('ContentModelArticle', JPATH_ADMINISTRATOR .
'/components/com_content/models/article.php');

/**
 * Content Component Article Model
 *
 * @since  1.5
 */
class ContentModelForm extends ContentModelArticle
{
	/**
	 * Model typeAlias string. Used for version history.
	 *
	 * @var        string
	 */
	public $typeAlias = 'com_content.article';

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function populateState()
	{
		$app = JFactory::getApplication();

		// Load state from the request.
		$pk = $app->input->getInt('a_id');
		$this->setState('article.id', $pk);

		$this->setState('article.catid',
$app->input->getInt('catid'));

		$return = $app->input->get('return', null,
'base64');
		$this->setState('return_page', base64_decode($return));

		// Load the parameters.
		$params = $app->getParams();
		$this->setState('params', $params);

		$this->setState('layout',
$app->input->getString('layout'));
	}

	/**
	 * Method to get article data.
	 *
	 * @param   integer  $itemId  The id of the article.
	 *
	 * @return  mixed  Content item data object on success, false on failure.
	 */
	public function getItem($itemId = null)
	{
		$itemId = (int) (!empty($itemId)) ? $itemId :
$this->getState('article.id');

		// Get a row instance.
		$table = $this->getTable();

		// Attempt to load the row.
		$return = $table->load($itemId);

		// Check for a table object error.
		if ($return === false && $table->getError())
		{
			$this->setError($table->getError());

			return false;
		}

		$properties = $table->getProperties(1);
		$value = ArrayHelper::toObject($properties, 'JObject');

		// Convert attrib field to Registry.
		$value->params = new Registry($value->attribs);

		// Compute selected asset permissions.
		$user   = JFactory::getUser();
		$userId = $user->get('id');
		$asset  = 'com_content.article.' . $value->id;

		// Check general edit permission first.
		if ($user->authorise('core.edit', $asset))
		{
			$value->params->set('access-edit', true);
		}

		// Now check if edit.own is available.
		elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset))
		{
			// Check for a valid user and that they are the owner.
			if ($userId == $value->created_by)
			{
				$value->params->set('access-edit', true);
			}
		}

		// Check edit state permission.
		if ($itemId)
		{
			// Existing item
			$value->params->set('access-change',
$user->authorise('core.edit.state', $asset));
		}
		else
		{
			// New item.
			$catId = (int) $this->getState('article.catid');

			if ($catId)
			{
				$value->params->set('access-change',
$user->authorise('core.edit.state',
'com_content.category.' . $catId));
				$value->catid = $catId;
			}
			else
			{
				$value->params->set('access-change',
$user->authorise('core.edit.state', 'com_content'));
			}
		}

		$value->articletext = $value->introtext;

		if (!empty($value->fulltext))
		{
			$value->articletext .= '<hr id="system-readmore"
/>' . $value->fulltext;
		}

		// Convert the metadata field to an array.
		$registry = new Registry($value->metadata);
		$value->metadata = $registry->toArray();

		if ($itemId)
		{
			$value->tags = new JHelperTags;
			$value->tags->getTagIds($value->id,
'com_content.article');
			$value->metadata['tags'] = $value->tags;
		}

		return $value;
	}

	/**
	 * Get the return URL.
	 *
	 * @return  string	The return URL.
	 *
	 * @since   1.6
	 */
	public function getReturnPage()
	{
		return base64_encode($this->getState('return_page'));
	}

	/**
	 * Method to save the form data.
	 *
	 * @param   array  $data  The form data.
	 *
	 * @return  boolean  True on success.
	 *
	 * @since   3.2
	 */
	public function save($data)
	{
		// Associations are not edited in frontend ATM so we have to inherit them
		if (JLanguageAssociations::isEnabled() &&
!empty($data['id'])
			&& $associations =
JLanguageAssociations::getAssociations('com_content',
'#__content', 'com_content.item',
$data['id']))
		{
			foreach ($associations as $tag => $associated)
			{
				$associations[$tag] = (int) $associated->id;
			}

			$data['associations'] = $associations;
		}

		return parent::save($data);
	}

	/**
	 * Allows preprocessing of the JForm object.
	 *
	 * @param   JForm   $form   The form object
	 * @param   array   $data   The data to be merged into the form object
	 * @param   string  $group  The plugin group to be executed
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	protected function preprocessForm(JForm $form, $data, $group =
'content')
	{
		$params = $this->getState()->get('params');

		if ($params && $params->get('enable_category') == 1
&& $params->get('catid'))
		{
			$form->setFieldAttribute('catid', 'default',
$params->get('catid'));
			$form->setFieldAttribute('catid', 'readonly',
'true');
		}

		return parent::preprocessForm($form, $data, $group);
	}
}
PK	��[���""models/forms/article.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fieldset
addfieldpath="/administrator/components/com_categories/models/fields">
		<field
			name="id"
			type="hidden"
			label="COM_CONTENT_ID_LABEL"
			class="inputbox"
			id="id"
			size="10"
			default="0"
			readonly="true"
		/>

		<field
			name="contenthistory"
			type="contenthistory"
			label="JTOOLBAR_VERSIONS"
			id="contenthistory"
			data-typeAlias="com_content.article"
		/>

		<field
			name="asset_id"
			type="hidden"
			filter="unset"
		/>

		<field
			name="title"
			type="text"
			label="JGLOBAL_TITLE"
			description="JFIELD_TITLE_DESC"
			id="title"
			class="inputbox"
			size="30"
			required="true"
		/>

		<field
			name="alias"
			type="text"
			label="JFIELD_ALIAS_LABEL"
			description="JFIELD_ALIAS_DESC"
			id="alias"
			hint="JFIELD_ALIAS_PLACEHOLDER"
			class="inputbox"
			size="45"
		/>

		<field
			name="articletext"
			type="editor"
			label="CONTENT_TEXT_LABEL"
			description="CONTENT_TEXT_DESC"
			buttons="true"
			class="inputbox"
			filter="JComponentHelper::filterText"
			asset_id="com_content"
		/>

		<field
			name="state"
			type="list"
			label="JSTATUS"
			description="JFIELD_PUBLISHED_DESC"
			id="state"
			class="inputbox"
			size="1"
			default="1"
			>
			<option value="1">JPUBLISHED</option>
			<option value="0">JUNPUBLISHED</option>
			<option value="2">JARCHIVED</option>
			<option value="-2">JTRASHED</option>
		</field>

		<field
			name="featured"
			type="list"
			label="JGLOBAL_FIELD_FEATURED_LABEL"
			description="JGLOBAL_FIELD_FEATURED_DESC"
			id="featured"
			class="inputbox"
			default="0"
			>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>

		<field
			name="catid"
			type="categoryedit"
			label="JCATEGORY"
			description="JFIELD_CATEGORY_DESC"
			id="catid"
			extension="com_content"
			class="inputbox"
			required="true"
		/>

		<field
			name="created"
			type="calendar"
			translateformat="true"
			id="created"
			filter="unset"
		/>

		<field
			name="created_by"
			type="text"
			id="created_by"
			filter="unset"
		/>

		<field
			name="created_by_alias"
			type="text"
			label="JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL"
			description="JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC"
			id="created_by_alias"
			class="inputbox"
			size="20"
		/>

		<field
			name="note"
			type="text"
			label="COM_CONTENT_FIELD_NOTE_LABEL"
			description="COM_CONTENT_FIELD_NOTE_DESC"
			class="inputbox"
			size="40"
			maxlength="255"
		/>

		<field
			name="version_note"
			type="text"
			label="JGLOBAL_FIELD_VERSION_NOTE_LABEL"
			description="JGLOBAL_FIELD_VERSION_NOTE_DESC"
			class="inputbox"
			maxlength="255"
			size="45"
			labelclass="control-label"
		/>

		<field
			name="publish_up"
			type="calendar"
			label="JGLOBAL_FIELD_PUBLISH_UP_LABEL"
			description="JGLOBAL_FIELD_PUBLISH_UP_DESC"
			id="publish_up"
			class="inputbox"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
		/>

		<field
			name="publish_down"
			type="calendar"
			label="JGLOBAL_FIELD_PUBLISH_DOWN_LABEL"
			description="JGLOBAL_FIELD_PUBLISH_DOWN_DESC"
			id="publish_down"
			class="inputbox"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
		/>

		<field
			name="language"
			type="contentlanguage"
			label="JFIELD_LANGUAGE_LABEL"
			description="JFIELD_LANGUAGE_DESC"
			class="inputbox"
			>
			<option value="*">JALL</option>
		</field>

		<field
			name="tags"
			type="tag"
			label="JTAG"
			description="JTAG_DESC"
			class="inputbox"
			multiple="true"
			size="45"
		/>

		<field
			name="metakey"
			type="textarea"
			label="JFIELD_META_KEYWORDS_LABEL"
			description="JFIELD_META_KEYWORDS_DESC"
			id="metakey"
			class="inputbox"
			rows="5"
			cols="50"
		/>

		<field
			name="metadesc"
			type="textarea"
			label="JFIELD_META_DESCRIPTION_LABEL"
			description="JFIELD_META_DESCRIPTION_DESC"
			id="metadesc"
			class="inputbox"
			rows="5"
			cols="50"
		/>

		<field
			name="access"
			type="accesslevel"
			label="JFIELD_ACCESS_LABEL"
			description="JFIELD_ACCESS_DESC"
			id="access"
			class="inputbox"
			size="1"
		/>

		<field
			name="captcha"
			type="captcha"
			label="COM_CONTENT_CAPTCHA_LABEL"
			description="COM_CONTENT_CAPTCHA_DESC"
			validate="captcha"
			namespace="article"
		/>
	</fieldset>
		<fields name="images">
		<fieldset name="image-intro">
			<field
				name="image_intro"
				type="media"
				label="COM_CONTENT_FIELD_INTRO_LABEL"
				description="COM_CONTENT_FIELD_INTRO_DESC"
			/>

			<field
				name="image_intro_alt"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_ALT_DESC"
				class="inputbox"
				size="20"
			/>

			<field
				name="image_intro_caption"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_CAPTION_DESC"
				class="inputbox"
				size="20"
			/>

			<field
				name="float_intro"
				type="list"
				label="COM_CONTENT_FLOAT_INTRO_LABEL"
				description="COM_CONTENT_FLOAT_DESC"
				useglobal="true"
				>
				<option value="right">COM_CONTENT_RIGHT</option>
				<option value="left">COM_CONTENT_LEFT</option>
				<option value="none">COM_CONTENT_NONE</option>
			</field>
		</fieldset>
		<fieldset name="image-full">
			<field
				name="image_fulltext"
				type="media"
				label="COM_CONTENT_FIELD_FULL_LABEL"
				description="COM_CONTENT_FIELD_FULL_DESC"
			/>

			<field
				name="image_fulltext_alt"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_ALT_DESC"
				class="inputbox"
				size="20"
			/>

			<field
				name="image_fulltext_caption"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_CAPTION_DESC"
				class="inputbox"
				size="20"
			/>

			<field
				name="float_fulltext"
				type="list"
				label="COM_CONTENT_FLOAT_FULLTEXT_LABEL"
				description="COM_CONTENT_FLOAT_DESC"
				useglobal="true"
				>
				<option value="right">COM_CONTENT_RIGHT</option>
				<option value="left">COM_CONTENT_LEFT</option>
				<option value="none">COM_CONTENT_NONE</option>
			</field>
		</fieldset>
	</fields>
	<fields name="urls">
		<field
			name="urla"
			type="url"
			label="COM_CONTENT_FIELD_URLA_LABEL"
			description="COM_CONTENT_FIELD_URL_DESC"
			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlatext"
			type="text"
			label="COM_CONTENT_FIELD_URLA_LINK_TEXT_LABEL"
			description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC"
			class="inputbox"
			size="20"
		/>

		<field
			name="targeta"
			type="hidden"
		/>

		<field
			name="urlb"
			type="url"
			label="COM_CONTENT_FIELD_URLB_LABEL"
			description="COM_CONTENT_FIELD_URL_DESC"
			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlbtext"
			type="text"
			label="COM_CONTENT_FIELD_URLB_LINK_TEXT_LABEL"
			description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC"
			class="inputbox"
			size="20"
		/>

		<field
			name="targetb"
			type="hidden"
		/>

		<field
			name="urlc"
			type="url"
			label="COM_CONTENT_FIELD_URLC_LABEL"
			description="COM_CONTENT_FIELD_URL_DESC"
 			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlctext"
			type="text"
			label="COM_CONTENT_FIELD_URLC_LINK_TEXT_LABEL"
			description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC"
			class="inputbox"
			size="20"
		/>

		<field
			name="targetc"
			type="hidden"
		/>
	</fields>
	<fields name="metadata">
		<fieldset
			name="jmetadata"
			label="JGLOBAL_FIELDSET_METADATA_OPTIONS">

				<field
					name="robots"
					type="hidden"
					label="JFIELD_METADATA_ROBOTS_LABEL"
					description="JFIELD_METADATA_ROBOTS_DESC"
					filter="unset"
					labelclass="control-label"
					>
					<option value="">JGLOBAL_USE_GLOBAL</option>
					<option value="index, follow"></option>
					<option value="noindex, follow"></option>
					<option value="index, nofollow"></option>
					<option value="noindex, nofollow"></option>
				</field>

				<field
					name="author"
					type="hidden"
					label="JAUTHOR"
					description="JFIELD_METADATA_AUTHOR_DESC"
					filter="unset"
					size="20"
					labelclass="control-label"
				/>

				<field
					name="rights"
					type="hidden"
					label="JFIELD_META_RIGHTS_LABEL"
					description="JFIELD_META_RIGHTS_DESC"
					filter="unset"
					labelclass="control-label"
				/>

				<field
					name="xreference"
					type="hidden"
					label="COM_CONTENT_FIELD_XREFERENCE_LABEL"
					description="COM_CONTENT_FIELD_XREFERENCE_DESC"
					filter="unset"
					class="inputbox"
					size="20"
					labelclass="control-label"
				/>

		</fieldset>
	</fields>
</form>
PK	��[�����
models/forms/filter_articles.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="filter">
		<field
			name="search"
			type="text"
			inputmode="search"
			label="COM_CONTENT_MODAL_FILTER_SEARCH_LABEL"
			description="COM_CONTENT_MODAL_FILTER_SEARCH_DESC"
			hint="JSEARCH_FILTER"
		/>

		<field
			name="published"
			type="status"
			label="COM_CONTENT_FILTER_PUBLISHED"
			description="COM_CONTENT_FILTER_PUBLISHED_DESC"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_PUBLISHED</option>
		</field>

		<field
			name="category_id"
			type="category"
			label="JOPTION_FILTER_CATEGORY"
			description="JOPTION_FILTER_CATEGORY_DESC"
			multiple="true"
			class="multipleCategories"
			extension="com_content"
			onchange="this.form.submit();"
			published="0,1,2"
		/>

		<field
			name="access"
			type="accesslevel"
			label="JOPTION_FILTER_ACCESS"
			description="JOPTION_FILTER_ACCESS_DESC"
			multiple="true"
			class="multipleAccessLevels"
			onchange="this.form.submit();"
		/>

		<field
			name="author_id"
			type="author"
			label="COM_CONTENT_FILTER_AUTHOR"
			description="COM_CONTENT_FILTER_AUTHOR_DESC"
			multiple="true"
			class="multipleAuthors"
			onchange="this.form.submit();"
			>
			<option value="0">JNONE</option>
		</field>

		<field
			name="level"
			type="integer"
			label="JOPTION_FILTER_LEVEL"
			description="JOPTION_FILTER_LEVEL_DESC"
			first="1"
			last="10"
			step="1"
			languages="*"
			onchange="this.form.submit();"
			>
			<option
value="">JOPTION_SELECT_MAX_LEVELS</option>
		</field>

		<field
			name="language"
			type="contentlanguage"
			label="JOPTION_FILTER_LANGUAGE"
			description="JOPTION_FILTER_LANGUAGE_DESC"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_LANGUAGE</option>
			<option value="*">JALL</option>
		</field>

		<field
			name="tag"
			type="tag"
			label="JOPTION_FILTER_TAG"
			description="JOPTION_FILTER_TAG_DESC"
			multiple="true"
			class="multipleTags"
			mode="nested"
			onchange="this.form.submit();"
		/>
	</fields>
	<fields name="list">
		<field
			name="fullordering"
			type="list"
			label="COM_CONTENT_LIST_FULL_ORDERING"
			description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
			onchange="this.form.submit();"
			default="a.title ASC"
		        validate="options"
			>
			<option value="">JGLOBAL_SORT_BY</option>
			<option value="a.ordering
ASC">JGRID_HEADING_ORDERING_ASC</option>
			<option value="a.ordering
DESC">JGRID_HEADING_ORDERING_DESC</option>
			<option value="a.state ASC">JSTATUS_ASC</option>
			<option value="a.state DESC">JSTATUS_DESC</option>
			<option value="a.title
ASC">JGLOBAL_TITLE_ASC</option>
			<option value="a.title
DESC">JGLOBAL_TITLE_DESC</option>
			<option value="category_title
ASC">JCATEGORY_ASC</option>
			<option value="category_title
DESC">JCATEGORY_DESC</option>
			<option value="association ASC"
requires="associations">JASSOCIATIONS_ASC</option>
			<option value="association DESC"
requires="associations">JASSOCIATIONS_DESC</option>
			<option value="a.access
ASC">JGRID_HEADING_ACCESS_ASC</option>
			<option value="a.access
DESC">JGRID_HEADING_ACCESS_DESC</option>
			<option value="a.created_by
ASC">JAUTHOR_ASC</option>
			<option value="a.created_by
DESC">JAUTHOR_DESC</option>
			<option value="language
ASC">JGRID_HEADING_LANGUAGE_ASC</option>
			<option value="language
DESC">JGRID_HEADING_LANGUAGE_DESC</option>
			<option value="a.created ASC">JDATE_ASC</option>
			<option value="a.created DESC">JDATE_DESC</option>
			<option value="a.id
ASC">JGRID_HEADING_ID_ASC</option>
			<option value="a.id
DESC">JGRID_HEADING_ID_DESC</option>
			<option value="a.featured
ASC">JFEATURED_ASC</option>
			<option value="a.featured
DESC">JFEATURED_DESC</option>
			<option value="a.hits
ASC">JGLOBAL_HITS_ASC</option>
			<option value="a.hits
DESC">JGLOBAL_HITS_DESC</option>
		</field>

		<field
			name="limit"
			type="limitbox"
			label="COM_CONTENT_LIST_LIMIT"
			description="COM_CONTENT_LIST_LIMIT_DESC"
			class="inputbox input-mini"
			default="25"
			onchange="this.form.submit();"
		/>
	</fields>
</form>
PK	��[�C����
router.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Routing class of com_content
 *
 * @since  3.3
 */
class ContentRouter extends JComponentRouterView
{
	protected $noIDs = false;

	/**
	 * Content Component router constructor
	 *
	 * @param   JApplicationCms  $app   The application object
	 * @param   JMenu            $menu  The menu object to work with
	 */
	public function __construct($app = null, $menu = null)
	{
		$params = JComponentHelper::getParams('com_content');
		$this->noIDs = (bool) $params->get('sef_ids');
		$categories = new
JComponentRouterViewconfiguration('categories');
		$categories->setKey('id');
		$this->registerView($categories);
		$category = new JComponentRouterViewconfiguration('category');
		$category->setKey('id')->setParent($categories,
'catid')->setNestable()->addLayout('blog');
		$this->registerView($category);
		$article = new JComponentRouterViewconfiguration('article');
		$article->setKey('id')->setParent($category,
'catid');
		$this->registerView($article);
		$this->registerView(new
JComponentRouterViewconfiguration('archive'));
		$this->registerView(new
JComponentRouterViewconfiguration('featured'));
		$form = new JComponentRouterViewconfiguration('form');
		$form->setKey('a_id');
		$this->registerView($form);

		parent::__construct($app, $menu);

		$this->attachRule(new JComponentRouterRulesMenu($this));

		if ($params->get('sef_advanced', 0))
		{
			$this->attachRule(new JComponentRouterRulesStandard($this));
			$this->attachRule(new JComponentRouterRulesNomenu($this));
		}
		else
		{
			JLoader::register('ContentRouterRulesLegacy', __DIR__ .
'/helpers/legacyrouter.php');
			$this->attachRule(new ContentRouterRulesLegacy($this));
		}
	}

	/**
	 * Method to get the segment(s) for a category
	 *
	 * @param   string  $id     ID of the category to retrieve the segments
for
	 * @param   array   $query  The request that is built right now
	 *
	 * @return  array|string  The segments of this item
	 */
	public function getCategorySegment($id, $query)
	{
		$category = JCategories::getInstance($this->getName())->get($id);

		if ($category)
		{
			$path = array_reverse($category->getPath(), true);
			$path[0] = '1:root';

			if ($this->noIDs)
			{
				foreach ($path as &$segment)
				{
					list($id, $segment) = explode(':', $segment, 2);
				}
			}

			return $path;
		}

		return array();
	}

	/**
	 * Method to get the segment(s) for a category
	 *
	 * @param   string  $id     ID of the category to retrieve the segments
for
	 * @param   array   $query  The request that is built right now
	 *
	 * @return  array|string  The segments of this item
	 */
	public function getCategoriesSegment($id, $query)
	{
		return $this->getCategorySegment($id, $query);
	}

	/**
	 * Method to get the segment(s) for an article
	 *
	 * @param   string  $id     ID of the article to retrieve the segments for
	 * @param   array   $query  The request that is built right now
	 *
	 * @return  array|string  The segments of this item
	 */
	public function getArticleSegment($id, $query)
	{
		if (!strpos($id, ':'))
		{
			$db = JFactory::getDbo();
			$dbquery = $db->getQuery(true);
			$dbquery->select($dbquery->qn('alias'))
				->from($dbquery->qn('#__content'))
				->where('id = ' . $dbquery->q($id));
			$db->setQuery($dbquery);

			$id .= ':' . $db->loadResult();
		}

		if ($this->noIDs)
		{
			list($void, $segment) = explode(':', $id, 2);

			return array($void => $segment);
		}

		return array((int) $id => $id);
	}

	/**
	 * Method to get the segment(s) for a form
	 *
	 * @param   string  $id     ID of the article form to retrieve the
segments for
	 * @param   array   $query  The request that is built right now
	 *
	 * @return  array|string  The segments of this item
	 *
	 * @since   3.7.3
	 */
	public function getFormSegment($id, $query)
	{
		return $this->getArticleSegment($id, $query);
	}

	/**
	 * Method to get the id for a category
	 *
	 * @param   string  $segment  Segment to retrieve the ID for
	 * @param   array   $query    The request that is parsed right now
	 *
	 * @return  mixed   The id of this item or false
	 */
	public function getCategoryId($segment, $query)
	{
		if (isset($query['id']))
		{
			$category = JCategories::getInstance($this->getName(),
array('access' => false))->get($query['id']);

			if ($category)
			{
				foreach ($category->getChildren() as $child)
				{
					if ($this->noIDs)
					{
						if ($child->alias == $segment)
						{
							return $child->id;
						}
					}
					else
					{
						if ($child->id == (int) $segment)
						{
							return $child->id;
						}
					}
				}
			}
		}

		return false;
	}

	/**
	 * Method to get the segment(s) for a category
	 *
	 * @param   string  $segment  Segment to retrieve the ID for
	 * @param   array   $query    The request that is parsed right now
	 *
	 * @return  mixed   The id of this item or false
	 */
	public function getCategoriesId($segment, $query)
	{
		return $this->getCategoryId($segment, $query);
	}

	/**
	 * Method to get the segment(s) for an article
	 *
	 * @param   string  $segment  Segment of the article to retrieve the ID
for
	 * @param   array   $query    The request that is parsed right now
	 *
	 * @return  mixed   The id of this item or false
	 */
	public function getArticleId($segment, $query)
	{
		if ($this->noIDs)
		{
			$db = JFactory::getDbo();
			$dbquery = $db->getQuery(true);
			$dbquery->select($dbquery->qn('id'))
				->from($dbquery->qn('#__content'))
				->where('alias = ' . $dbquery->q($segment))
				->where('catid = ' .
$dbquery->q($query['id']));
			$db->setQuery($dbquery);

			return (int) $db->loadResult();
		}

		return (int) $segment;
	}
}

/**
 * Content router functions
 *
 * These functions are proxys for the new router interface
 * for old SEF extensions.
 *
 * @param   array  &$query  An array of URL arguments
 *
 * @return  array  The URL arguments to use to assemble the subsequent URL.
 *
 * @deprecated  4.0  Use Class based routers instead
 */
function contentBuildRoute(&$query)
{
	$app = JFactory::getApplication();
	$router = new ContentRouter($app, $app->getMenu());

	return $router->build($query);
}

/**
 * Parse the segments of a URL.
 *
 * This function is a proxy for the new router interface
 * for old SEF extensions.
 *
 * @param   array  $segments  The segments of the URL to parse.
 *
 * @return  array  The URL attributes to be used by the application.
 *
 * @since   3.3
 * @deprecated  4.0  Use Class based routers instead
 */
function contentParseRoute($segments)
{
	$app = JFactory::getApplication();
	$router = new ContentRouter($app, $app->getMenu());

	return $router->parse($segments);
}
PK	��[�+i	views/archive/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.caption');
?>
<div class="archive<?php echo $this->pageclass_sfx;
?>">
<?php if ($this->params->get('show_page_heading')) :
?>
<div class="page-header">
<h1>
	<?php echo
$this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<form id="adminForm" action="<?php echo
JRoute::_('index.php'); ?>" method="post"
class="form-inline">
	<fieldset class="filters">
	<div class="filter-search">
		<?php if ($this->params->get('filter_field') !==
'hide') : ?>
		<label class="filter-search-lbl element-invisible"
for="filter-search"><?php echo
JText::_('COM_CONTENT_TITLE_FILTER_LABEL') .
'&#160;'; ?></label>
		<input type="text" name="filter-search"
id="filter-search" value="<?php echo
$this->escape($this->filter); ?>" class="inputbox
span2"
onchange="document.getElementById('adminForm').submit();"
placeholder="<?php echo
JText::_('COM_CONTENT_TITLE_FILTER_LABEL'); ?>" />
		<?php endif; ?>

		<?php echo $this->form->monthField; ?>
		<?php echo $this->form->yearField; ?>
		<?php echo $this->form->limitField; ?>

		<button type="submit" class="btn btn-primary"
style="vertical-align: top;"><?php echo
JText::_('JGLOBAL_FILTER_BUTTON'); ?></button>
		<input type="hidden" name="view"
value="archive" />
		<input type="hidden" name="option"
value="com_content" />
		<input type="hidden" name="limitstart"
value="0" />
	</div>
	<br />
	</fieldset>

	<?php echo $this->loadTemplate('items'); ?>
</form>
</div>
PK	��[4��zzviews/archive/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARCHIVE_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_ARCHIVE_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_ARCHIVED"
		/>
		<message>
			<![CDATA[com_content_archive_view_default_desc]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field
				name="catid"
				type="category"
				extension="com_content"
				multiple="true"
				size="5"
				label="JCATEGORY"
				description="JFIELD_CATEGORY_DESC"
			>
				<option value="">JOPTION_ALL_CATEGORIES</option>
			</field>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">

		<!-- Basic options. -->
		<fieldset name="basic"
label="JGLOBAL_ARCHIVE_OPTIONS"
		>

			<field 
				name="orderby_sec" 
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				description="JGLOBAL_ARTICLE_ORDER_DESC"
				default="alpha"
				>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits">JGLOBAL_LEAST_HITS</option>
				<option
value="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field 
				name="order_date" 
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				description="JGLOBAL_ORDERING_DATE_DESC"
				default="created"
				>
				<option value="created">JGLOBAL_Created</option>
				<option
value="modified">JGLOBAL_Modified</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field 
				name="display_num" 
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
				default="5"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

			<field
				name="filter_field"
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				description="JGLOBAL_FILTER_FIELD_DESC"
				default=""
				useglobal="true"
				>
				<option value="hide">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="introtext_limit" 
				type="number" 
				label="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL"
				description="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_DESC"

				default="100"
			/>

		</fieldset>

		<!-- Articles options. -->
		<fieldset name="articles"
			label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL"
		>

			<field 
				name="show_intro" 
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				description="JGLOBAL_SHOW_INTRO_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"
				default=""
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field 
				name="show_category" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_category" 
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				description="JGLOBAL_LINK_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
				useglobal="true"
				>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
				useglobal="true"
				>
				<option	value="0">JNO</option>
				<option	value="1">JYES</option>
			</field>

			<field 
				name="link_titles" 
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_author" 
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				description="JGLOBAL_SHOW_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				description="JGLOBAL_LINK_AUTHOR_DESC"
				useglobal="true"
				>
				<option	value="0">JNO</option>
				<option	value="1">JYES</option>
			</field>

			<field 
				name="show_create_date" 
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				description="JGLOBAL_SHOW_CREATE_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_modify_date" 
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_publish_date" 
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_item_navigation" 
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				description="JGLOBAL_SHOW_NAVIGATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_hits" 
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				description="JGLOBAL_SHOW_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
		</fieldset>

	</fields>
</metadata>
PK	��[��B�%%$views/archive/tmpl/default_items.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$params = $this->params;
?>

<div id="archive-items">
	<?php foreach ($this->items as $i => $item) : ?>
		<?php $info =
$item->params->get('info_block_position', 0); ?>
		<div class="row<?php echo $i % 2; ?>" itemscope
itemtype="https://schema.org/Article">
			<div class="page-header">
				<h2 itemprop="headline">
					<?php if ($params->get('link_titles')) : ?>
						<a href="<?php echo
JRoute::_(ContentHelperRoute::getArticleRoute($item->slug,
$item->catid, $item->language)); ?>"
itemprop="url">
							<?php echo $this->escape($item->title); ?>
						</a>
					<?php else : ?>
						<?php echo $this->escape($item->title); ?>
					<?php endif; ?>
				</h2>

				<?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
				<?php echo $item->event->afterDisplayTitle; ?>

				<?php if ($params->get('show_author') &&
!empty($item->author )) : ?>
					<div class="createdby" itemprop="author"
itemscope itemtype="https://schema.org/Person">
					<?php $author = $item->created_by_alias ?: $item->author;
?>
					<?php $author = '<span itemprop="name">'
. $author . '</span>'; ?>
						<?php if (!empty($item->contact_link) &&
$params->get('link_author') == true) : ?>
							<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
JHtml::_('link', $this->item->contact_link, $author,
array('itemprop' => 'url'))); ?>
						<?php else : ?>
							<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
$author); ?>
						<?php endif; ?>
					</div>
				<?php endif; ?>
			</div>
		<?php $useDefList = ($params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
			|| $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category')); ?>
		<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
			<div class="article-info muted">
				<dl class="article-info">
				<dt class="article-info-term">
					<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
				</dt>

				<?php if ($params->get('show_parent_category')
&& !empty($item->parent_slug)) : ?>
					<dd>
						<div class="parent-category-name">
							<?php $title = $this->escape($item->parent_title); ?>
							<?php if ($params->get('link_parent_category')
&& !empty($item->parent_slug)) : ?>
								<?php $url = '<a href="' .
JRoute::_(ContentHelperRoute::getCategoryRoute($item->parent_slug)) .
'" itemprop="genre">' . $title .
'</a>'; ?>
								<?php echo JText::sprintf('COM_CONTENT_PARENT', $url);
?>
							<?php else : ?>
								<?php echo JText::sprintf('COM_CONTENT_PARENT',
'<span itemprop="genre">' . $title .
'</span>'); ?>
							<?php endif; ?>
						</div>
					</dd>
				<?php endif; ?>
				<?php if ($params->get('show_category')) : ?>
					<dd>
						<div class="category-name">
							<?php $title = $this->escape($item->category_title); ?>
							<?php if ($params->get('link_category') &&
$item->catslug) : ?>
								<?php $url = '<a href="' .
JRoute::_(ContentHelperRoute::getCategoryRoute($item->catslug)) .
'" itemprop="genre">' . $title .
'</a>'; ?>
								<?php echo JText::sprintf('COM_CONTENT_CATEGORY',
$url); ?>
							<?php else : ?>
								<?php echo JText::sprintf('COM_CONTENT_CATEGORY',
'<span itemprop="genre">' . $title .
'</span>'); ?>
							<?php endif; ?>
						</div>
					</dd>
				<?php endif; ?>

				<?php if ($params->get('show_publish_date')) : ?>
					<dd>
						<div class="published">
							<span class="icon-calendar"
aria-hidden="true"></span>
							<time datetime="<?php echo JHtml::_('date',
$item->publish_up, 'c'); ?>"
itemprop="datePublished">
								<?php echo
JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON',
JHtml::_('date', $item->publish_up,
JText::_('DATE_FORMAT_LC3'))); ?>
							</time>
						</div>
					</dd>
				<?php endif; ?>

				<?php if ($info == 0) : ?>
					<?php if ($params->get('show_modify_date')) : ?>
						<dd>
							<div class="modified">
								<span class="icon-calendar"
aria-hidden="true"></span>
								<time datetime="<?php echo JHtml::_('date',
$item->modified, 'c'); ?>"
itemprop="dateModified">
									<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED',
JHtml::_('date', $item->modified,
JText::_('DATE_FORMAT_LC3'))); ?>
								</time>
							</div>
						</dd>
					<?php endif; ?>
					<?php if ($params->get('show_create_date')) : ?>
						<dd>
							<div class="create">
								<span class="icon-calendar"
aria-hidden="true"></span>
								<time datetime="<?php echo JHtml::_('date',
$item->created, 'c'); ?>"
itemprop="dateCreated">
									<?php echo
JText::sprintf('COM_CONTENT_CREATED_DATE_ON',
JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC3'))); ?>
								</time>
							</div>
						</dd>
					<?php endif; ?>

					<?php if ($params->get('show_hits')) : ?>
						<dd>
							<div class="hits">
								<span class="icon-eye-open"></span>
								<meta itemprop="interactionCount"
content="UserPageVisits:<?php echo $item->hits; ?>"
/>
								<?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS',
$item->hits); ?>
							</div>
						</dd>
					<?php endif; ?>
				<?php endif; ?>
				</dl>
			</div>
		<?php endif; ?>

		<?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
		<?php echo $item->event->beforeDisplayContent; ?>
		<?php if ($params->get('show_intro')) : ?>
			<div class="intro" itemprop="articleBody">
<?php echo JHtml::_('string.truncateComplex',
$item->introtext, $params->get('introtext_limit')); ?>
</div>
		<?php endif; ?>

		<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
			<div class="article-info muted">
				<dl class="article-info">
				<dt class="article-info-term"><?php echo
JText::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>

				<?php if ($info == 1) : ?>
					<?php if ($params->get('show_parent_category')
&& !empty($item->parent_slug)) : ?>
						<dd>
							<div class="parent-category-name">
								<?php $title = $this->escape($item->parent_title); ?>
								<?php if ($params->get('link_parent_category')
&& $item->parent_slug) : ?>
									<?php $url = '<a href="' .
JRoute::_(ContentHelperRoute::getCategoryRoute($item->parent_slug)) .
'" itemprop="genre">' . $title .
'</a>'; ?>
									<?php echo JText::sprintf('COM_CONTENT_PARENT',
$url); ?>
								<?php else : ?>
									<?php echo JText::sprintf('COM_CONTENT_PARENT',
'<span itemprop="genre">' . $title .
'</span>'); ?>
								<?php endif; ?>
							</div>
						</dd>
					<?php endif; ?>
					<?php if ($params->get('show_category')) : ?>
						<dd>
							<div class="category-name">
								<?php $title = $this->escape($item->category_title); ?>
								<?php if ($params->get('link_category') &&
$item->catslug) : ?>
									<?php $url = '<a href="' .
JRoute::_(ContentHelperRoute::getCategoryRoute($item->catslug)) .
'" itemprop="genre">' . $title .
'</a>'; ?>
									<?php echo JText::sprintf('COM_CONTENT_CATEGORY',
$url); ?>
								<?php else : ?>
									<?php echo JText::sprintf('COM_CONTENT_CATEGORY',
'<span itemprop="genre">' . $title .
'</span>'); ?>
								<?php endif; ?>
							</div>
						</dd>
					<?php endif; ?>
					<?php if ($params->get('show_publish_date')) : ?>
						<dd>
							<div class="published">
								<span class="icon-calendar"
aria-hidden="true"></span>
								<time datetime="<?php echo JHtml::_('date',
$item->publish_up, 'c'); ?>"
itemprop="datePublished">
									<?php echo
JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON',
JHtml::_('date', $item->publish_up,
JText::_('DATE_FORMAT_LC3'))); ?>
								</time>
							</div>
						</dd>
					<?php endif; ?>
				<?php endif; ?>

				<?php if ($params->get('show_create_date')) : ?>
					<dd>
						<div class="create">
							<span class="icon-calendar"
aria-hidden="true"></span>
							<time datetime="<?php echo JHtml::_('date',
$item->created, 'c'); ?>"
itemprop="dateCreated">
								<?php echo
JText::sprintf('COM_CONTENT_CREATED_DATE_ON',
JHtml::_('date', $item->modified,
JText::_('DATE_FORMAT_LC3'))); ?>
							</time>
						</div>
					</dd>
				<?php endif; ?>
				<?php if ($params->get('show_modify_date')) : ?>
					<dd>
						<div class="modified">
							<span class="icon-calendar"
aria-hidden="true"></span>
							<time datetime="<?php echo JHtml::_('date',
$item->modified, 'c'); ?>"
itemprop="dateModified">
								<?php echo JText::sprintf('COM_CONTENT_LAST_UPDATED',
JHtml::_('date', $item->modified,
JText::_('DATE_FORMAT_LC3'))); ?>
							</time>
						</div>
					</dd>
				<?php endif; ?>
				<?php if ($params->get('show_hits')) : ?>
					<dd>
						<div class="hits">
							<span class="icon-eye-open"></span>
							<meta content="UserPageVisits:<?php echo $item->hits;
?>" itemprop="interactionCount" />
							<?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS',
$item->hits); ?>
						</div>
					</dd>
				<?php endif; ?>
			</dl>
		</div>
		<?php endif; ?>
		<?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
		<?php echo $item->event->afterDisplayContent; ?>
	</div>
	<?php endforeach; ?>
</div>
<div class="pagination">
	<p class="counter"> <?php echo
$this->pagination->getPagesCounter(); ?> </p>
	<?php echo $this->pagination->getPagesLinks(); ?>
</div>
PK	��["��8JJviews/archive/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class ContentViewArchive extends JViewLegacy
{
	protected $state = null;

	protected $item = null;

	protected $items = null;

	protected $pagination = null;

	protected $years = null;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$user       = JFactory::getUser();
		$state      = $this->get('State');
		$items      = $this->get('Items');
		$pagination = $this->get('Pagination');

		// Flag indicates to not add limitstart=0 to URL
		$pagination->hideEmptyLimitstart = true;

		// Get the page/component configuration
		$params = &$state->params;

		JPluginHelper::importPlugin('content');

		foreach ($items as $item)
		{
			$item->catslug     = $item->category_alias ? ($item->catid .
':' . $item->category_alias) : $item->catid;
			$item->parent_slug = $item->parent_alias ? ($item->parent_id .
':' . $item->parent_alias) : $item->parent_id;

			// No link for ROOT category
			if ($item->parent_alias === 'root')
			{
				$item->parent_slug = null;
			}

			$item->event = new stdClass;

			$dispatcher = JEventDispatcher::getInstance();

			// Old plugins: Ensure that text property is available
			if (!isset($item->text))
			{
				$item->text = $item->introtext;
			}

			$dispatcher->trigger('onContentPrepare', array
('com_content.archive', &$item, &$item->params, 0));

			// Old plugins: Use processed text as introtext
			$item->introtext = $item->text;

			$results = $dispatcher->trigger('onContentAfterTitle',
array('com_content.archive', &$item, &$item->params,
0));
			$item->event->afterDisplayTitle = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentBeforeDisplay',
array('com_content.archive', &$item, &$item->params,
0));
			$item->event->beforeDisplayContent = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentAfterDisplay',
array('com_content.archive', &$item, &$item->params,
0));
			$item->event->afterDisplayContent = trim(implode("\n",
$results));
		}

		$form = new stdClass;

		// Month Field
		$months = array(
			'' => JText::_('COM_CONTENT_MONTH'),
			'1' => JText::_('JANUARY_SHORT'),
			'2' => JText::_('FEBRUARY_SHORT'),
			'3' => JText::_('MARCH_SHORT'),
			'4' => JText::_('APRIL_SHORT'),
			'5' => JText::_('MAY_SHORT'),
			'6' => JText::_('JUNE_SHORT'),
			'7' => JText::_('JULY_SHORT'),
			'8' => JText::_('AUGUST_SHORT'),
			'9' => JText::_('SEPTEMBER_SHORT'),
			'10' => JText::_('OCTOBER_SHORT'),
			'11' => JText::_('NOVEMBER_SHORT'),
			'12' => JText::_('DECEMBER_SHORT')
		);
		$form->monthField = JHtml::_(
			'select.genericlist',
			$months,
			'month',
			array(
				'list.attr' => 'size="1"
class="inputbox"',
				'list.select' => $state->get('filter.month'),
				'option.key' => null
			)
		);

		// Year Field
		$this->years = $this->getModel()->getYears();
		$years = array();
		$years[] = JHtml::_('select.option', null,
JText::_('JYEAR'));

		for ($i = 0, $iMax = count($this->years); $i < $iMax; $i++)
		{
			$years[] = JHtml::_('select.option', $this->years[$i],
$this->years[$i]);
		}

		$form->yearField = JHtml::_(
			'select.genericlist',
			$years,
			'year',
			array('list.attr' => 'size="1"
class="inputbox"', 'list.select' =>
$state->get('filter.year'))
		);
		$form->limitField = $pagination->getLimitBox();

		// Escape strings for HTML output
		$this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx'));

		$this->filter     = $state->get('list.filter');
		$this->form       = &$form;
		$this->items      = &$items;
		$this->params     = &$params;
		$this->user       = &$user;
		$this->pagination = &$pagination;
		$this->pagination->setAdditionalUrlParam('month',
$state->get('filter.month'));
		$this->pagination->setAdditionalUrlParam('year',
$state->get('filter.year'));

		$this->_prepareDocument();

		parent::display($tpl);
	}

	/**
	 * Prepares the document
	 *
	 * @return  void
	 */
	protected function _prepareDocument()
	{
		$app   = JFactory::getApplication();
		$menus = $app->getMenu();
		$title = null;

		// Because the application sets a default page title,
		// we need to get it from the menu item itself
		$menu = $menus->getActive();

		if ($menu)
		{
			$this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
		}
		else
		{
			$this->params->def('page_heading',
JText::_('JGLOBAL_ARTICLES'));
		}

		$title = $this->params->get('page_title', '');

		if (empty($title))
		{
			$title = $app->get('sitename');
		}
		elseif ($app->get('sitename_pagetitles', 0) == 1)
		{
			$title = JText::sprintf('JPAGETITLE',
$app->get('sitename'), $title);
		}
		elseif ($app->get('sitename_pagetitles', 0) == 2)
		{
			$title = JText::sprintf('JPAGETITLE', $title,
$app->get('sitename'));
		}

		$this->document->setTitle($title);

		if ($this->params->get('menu-meta_description'))
		{
			$this->document->setDescription($this->params->get('menu-meta_description'));
		}

		if ($this->params->get('menu-meta_keywords'))
		{
			$this->document->setMetadata('keywords',
$this->params->get('menu-meta_keywords'));
		}

		if ($this->params->get('robots'))
		{
			$this->document->setMetadata('robots',
$this->params->get('robots'));
		}
	}
}
PK	��[�
��views/article/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params  = $this->item->params;
$urls    = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user    = JFactory::getUser();
$info    = $params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the
parameter.
$assocParam = (JLanguageAssociations::isEnabled() &&
$params->get('show_associations'));
JHtml::_('behavior.caption');

$currentDate       = JFactory::getDate()->format('Y-m-d
H:i:s');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired         = $this->item->publish_down < $currentDate
&& $this->item->publish_down !==
JFactory::getDbo()->getNullDate();

?>
<div class="item-page<?php echo $this->pageclass_sfx;
?>" itemscope itemtype="https://schema.org/Article">
	<meta itemprop="inLanguage" content="<?php echo
($this->item->language === '*') ?
JFactory::getConfig()->get('language') :
$this->item->language; ?>" />
	<?php if ($this->params->get('show_page_heading')) :
?>
	<div class="page-header">
		<h1> <?php echo
$this->escape($this->params->get('page_heading')); ?>
</h1>
	</div>
	<?php endif;
	if (!empty($this->item->pagination) &&
$this->item->pagination &&
!$this->item->paginationposition &&
$this->item->paginationrelative)
	{
		echo $this->item->pagination;
	}
	?>

	<?php // Todo Not that elegant would be nice to group the params ?>
	<?php $useDefList = ($params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
	|| $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam); ?>

	<?php if (!$useDefList && $this->print) : ?>
		<div id="pop-print" class="btn hidden-print">
			<?php echo JHtml::_('icon.print_screen', $this->item,
$params); ?>
		</div>
		<div class="clearfix"> </div>
	<?php endif; ?>
	<?php if ($params->get('show_title')) : ?>
	<div class="page-header">
		<h2 itemprop="headline">
			<?php echo $this->escape($this->item->title); ?>
		</h2>
		<?php if ($this->item->state == 0) : ?>
			<span class="label label-warning"><?php echo
JText::_('JUNPUBLISHED'); ?></span>
		<?php endif; ?>
		<?php if ($isNotPublishedYet) : ?>
			<span class="label label-warning"><?php echo
JText::_('JNOTPUBLISHEDYET'); ?></span>
		<?php endif; ?>
		<?php if ($isExpired) : ?>
			<span class="label label-warning"><?php echo
JText::_('JEXPIRED'); ?></span>
		<?php endif; ?>
	</div>
	<?php endif; ?>
	<?php if (!$this->print) : ?>
		<?php if ($canEdit || $params->get('show_print_icon') ||
$params->get('show_email_icon')) : ?>
			<?php echo JLayoutHelper::render('joomla.content.icons',
array('params' => $params, 'item' =>
$this->item, 'print' => false)); ?>
		<?php endif; ?>
	<?php else : ?>
		<?php if ($useDefList) : ?>
			<div id="pop-print" class="btn hidden-print">
				<?php echo JHtml::_('icon.print_screen', $this->item,
$params); ?>
			</div>
		<?php endif; ?>
	<?php endif; ?>

	<?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
	<?php echo $this->item->event->afterDisplayTitle; ?>

	<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
		<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
		<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'above')); ?>
	<?php endif; ?>

	<?php if ($info == 0 && $params->get('show_tags',
1) && !empty($this->item->tags->itemTags)) : ?>
		<?php $this->item->tagLayout = new
JLayoutFile('joomla.content.tags'); ?>

		<?php echo
$this->item->tagLayout->render($this->item->tags->itemTags);
?>
	<?php endif; ?>

	<?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
	<?php echo $this->item->event->beforeDisplayContent; ?>

	<?php if (isset($urls) && ((!empty($urls->urls_position)
&& ($urls->urls_position == '0')) ||
($params->get('urls_position') == '0' &&
empty($urls->urls_position)))
		|| (empty($urls->urls_position) &&
(!$params->get('urls_position')))) : ?>
	<?php echo $this->loadTemplate('links'); ?>
	<?php endif; ?>
	<?php if ($params->get('access-view')) : ?>
	<?php echo JLayoutHelper::render('joomla.content.full_image',
$this->item); ?>
	<?php
	if (!empty($this->item->pagination) &&
$this->item->pagination &&
!$this->item->paginationposition &&
!$this->item->paginationrelative) :
		echo $this->item->pagination;
	endif;
	?>
	<?php if (isset ($this->item->toc)) :
		echo $this->item->toc;
	endif; ?>
	<div itemprop="articleBody">
		<?php echo $this->item->text; ?>
	</div>

	<?php if ($info == 1 || $info == 2) : ?>
		<?php if ($useDefList) : ?>
				<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
			<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'below')); ?>
		<?php endif; ?>
		<?php if ($params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
			<?php $this->item->tagLayout = new
JLayoutFile('joomla.content.tags'); ?>
			<?php echo
$this->item->tagLayout->render($this->item->tags->itemTags);
?>
		<?php endif; ?>
	<?php endif; ?>

	<?php
	if (!empty($this->item->pagination) &&
$this->item->pagination &&
$this->item->paginationposition &&
!$this->item->paginationrelative) :
		echo $this->item->pagination;
	?>
	<?php endif; ?>
	<?php if (isset($urls) && ((!empty($urls->urls_position)
&& ($urls->urls_position == '1')) ||
($params->get('urls_position') == '1'))) : ?>
	<?php echo $this->loadTemplate('links'); ?>
	<?php endif; ?>
	<?php // Optional teaser intro text for guests ?>
	<?php elseif ($params->get('show_noauth') == true
&& $user->get('guest')) : ?>
	<?php echo
JLayoutHelper::render('joomla.content.intro_image',
$this->item); ?>
	<?php echo JHtml::_('content.prepare',
$this->item->introtext); ?>
	<?php // Optional link to let them register to see the whole article.
?>
	<?php if ($params->get('show_readmore') &&
$this->item->fulltext != null) : ?>
	<?php $menu = JFactory::getApplication()->getMenu(); ?>
	<?php $active = $menu->getActive(); ?>
	<?php $itemId = $active->id; ?>
	<?php $link = new
JUri(JRoute::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false)); ?>
	<?php $link->setVar('return',
base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language))); ?>
	<p class="readmore">
		<a href="<?php echo $link; ?>"
class="register">
			<?php if ($params->get('alternative_readmore',
'') === '') : ?>
				<?php echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
?>
			<?php else : ?>
				<?php echo $params->get('alternative_readmore'); ?>
				<?php if ($params->get('show_readmore_title', 0) != 0)
: ?>
					<?php echo JHtml::_('string.truncate',
$this->item->title, $params->get('readmore_limit'));
?>
				<?php endif; ?>
			<?php endif; ?>
		</a>
	</p>
	<?php endif; ?>
	<?php endif; ?>
	<?php
	if (!empty($this->item->pagination) &&
$this->item->pagination &&
$this->item->paginationposition &&
$this->item->paginationrelative) :
		echo $this->item->pagination;
	?>
	<?php endif; ?>
	<?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
	<?php echo $this->item->event->afterDisplayContent; ?>
</div>
PK	��[�pLf``views/article/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLE_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_ARTICLE_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_SINGLE_ARTICLE"
		/>
		<message>
			<![CDATA[COM_CONTENT_ARTICLE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_content/models/fields">

			<field 
				name="id" 
				type="modal_article"
				label="COM_CONTENT_FIELD_SELECT_ARTICLE_LABEL"
				description="COM_CONTENT_FIELD_SELECT_ARTICLE_DESC"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">

		<!-- Basic options. -->
		<fieldset name="basic"
			label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL">

		<field
			name="show_title"
			type="list"
			label="JGLOBAL_SHOW_TITLE_LABEL"
			description="JGLOBAL_SHOW_TITLE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_titles"
			type="list"
			label="JGLOBAL_LINKED_TITLES_LABEL"
			description="JGLOBAL_LINKED_TITLES_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field 
			name="show_intro" 
			type="list"
			label="JGLOBAL_SHOW_INTRO_LABEL"
			description="JGLOBAL_SHOW_INTRO_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="info_block_position"
			type="list"
			label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
			description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"
			useglobal="true"
			>
			<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
			<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
			<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
		</field>

		<field
			name="info_block_show_title"
			type="list"
			label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
			description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option	value="1">JSHOW</option>
			<option	value="0">JHIDE</option>
		</field>

		<field
			name="show_category"
			type="list"
			label="JGLOBAL_SHOW_CATEGORY_LABEL"
			description="JGLOBAL_SHOW_CATEGORY_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_category"
			type="list"
			label="JGLOBAL_LINK_CATEGORY_LABEL"
			description="JGLOBAL_LINK_CATEGORY_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_parent_category"
			type="list"
			label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
			description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_parent_category"
			type="list"
			label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
			description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_associations"
			type="list"
			label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
			description="JGLOBAL_SHOW_ASSOCIATIONS_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_author"
			type="list"
			label="JGLOBAL_SHOW_AUTHOR_LABEL"
			description="JGLOBAL_SHOW_AUTHOR_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_author"
			type="list"
			label="JGLOBAL_LINK_AUTHOR_LABEL"
			description="JGLOBAL_LINK_AUTHOR_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_create_date"
			type="list"
			label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
			description="JGLOBAL_SHOW_CREATE_DATE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_modify_date"
			type="list"
			label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
			description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_publish_date"
			type="list"
			label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
			description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_item_navigation"
			type="list"
			label="JGLOBAL_SHOW_NAVIGATION_LABEL"
			description="JGLOBAL_SHOW_NAVIGATION_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_vote"
			type="list"
			label="JGLOBAL_SHOW_VOTE_LABEL"
			description="JGLOBAL_SHOW_VOTE_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_icons"
			type="list"
			label="JGLOBAL_SHOW_ICONS_LABEL"
			description="JGLOBAL_SHOW_ICONS_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_print_icon"
			type="list"
			label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
			description="JGLOBAL_SHOW_PRINT_ICON_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_email_icon"
			type="list"
			label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
			description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_hits"
			type="list"
			label="JGLOBAL_SHOW_HITS_LABEL"
			description="JGLOBAL_SHOW_HITS_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_tags"
			type="list"
			label="JGLOBAL_SHOW_TAGS_LABEL"
			description="JGLOBAL_SHOW_TAGS_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_noauth"
			type="list"
			label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
			description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
			useglobal="true"
			class="chzn-color"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>
		<field
			name="urls_position"
			type="list"
			label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
			description="COM_CONTENT_FIELD_URLSPOSITION_DESC"
			useglobal="true"
			>
			<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
			<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
		</field>
		</fieldset>
	</fields>
</metadata>
PK	��[���

$views/article/tmpl/default_links.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Create shortcut
$urls = json_decode($this->item->urls);

// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) ||
!empty($urls->urlc))) :
?>
<div class="content-links">
	<ul class="nav nav-tabs nav-stacked">
		<?php
			$urlarray = array(
			array($urls->urla, $urls->urlatext, $urls->targeta,
'a'),
			array($urls->urlb, $urls->urlbtext, $urls->targetb,
'b'),
			array($urls->urlc, $urls->urlctext, $urls->targetc,
'c')
			);
			foreach ($urlarray as $url) :
				$link = $url[0];
				$label = $url[1];
				$target = $url[2];
				$id = $url[3];

				if ( ! $link) :
					continue;
				endif;

				// If no label is present, take the link
				$label = $label ?: $link;

				// If no target is present, use the default
				$target = $target ?: $params->get('target' . $id);
				?>
			<li class="content-links-<?php echo $id; ?>">
				<?php
					// Compute the correct link

					switch ($target)
					{
						case 1:
							// Open in a new window
							echo '<a href="' . htmlspecialchars($link,
ENT_COMPAT, 'UTF-8') . '" target="_blank"
rel="nofollow noopener noreferrer">' .
								htmlspecialchars($label, ENT_COMPAT, 'UTF-8') .
'</a>';
							break;

						case 2:
							// Open in a popup window
							$attribs =
'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
							echo "<a href=\"" . htmlspecialchars($link,
ENT_COMPAT, 'UTF-8') . "\"
onclick=\"window.open(this.href, 'targetWindow',
'" . $attribs . "'); return false;\"
rel=\"noopener noreferrer\">" .
								htmlspecialchars($label, ENT_COMPAT, 'UTF-8') .
'</a>';
							break;
						case 3:
							// Open in a modal window
							JHtml::_('behavior.modal', 'a.modal');
							echo '<a class="modal" href="' .
htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" 
rel="{handler: \'iframe\', size: {x:600, y:600}} noopener
noreferrer">' .
								htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '
</a>';
							break;

						default:
							// Open in parent window
							echo '<a href="' . htmlspecialchars($link,
ENT_COMPAT, 'UTF-8') . '"
rel="nofollow">' .
								htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '
</a>';
							break;
					}
				?>
				</li>
		<?php endforeach; ?>
	</ul>
</div>
<?php endif; ?>
PK	��[���(�(views/article/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML Article View class for the Content component
 *
 * @since  1.5
 */
class ContentViewArticle extends JViewLegacy
{
	protected $item;

	protected $params;

	protected $print;

	protected $state;

	protected $user;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$app        = JFactory::getApplication();
		$user       = JFactory::getUser();
		$dispatcher = JEventDispatcher::getInstance();

		$this->item  = $this->get('Item');
		$this->print = $app->input->getBool('print');
		$this->state = $this->get('State');
		$this->user  = $user;

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseWarning(500, implode("\n", $errors));

			return false;
		}

		// Create a shortcut for $item.
		$item            = $this->item;
		$item->tagLayout = new JLayoutFile('joomla.content.tags');

		// Add router helpers.
		$item->slug        = $item->alias ? ($item->id . ':' .
$item->alias) : $item->id;
		$item->catslug     = $item->category_alias ? ($item->catid .
':' . $item->category_alias) : $item->catid;
		$item->parent_slug = $item->parent_alias ? ($item->parent_id .
':' . $item->parent_alias) : $item->parent_id;

		// No link for ROOT category
		if ($item->parent_alias === 'root')
		{
			$item->parent_slug = null;
		}

		// TODO: Change based on shownoauth
		$item->readmore_link =
JRoute::_(ContentHelperRoute::getArticleRoute($item->slug,
$item->catid, $item->language));

		// Merge article params. If this is single-article view, menu params
override article params
		// Otherwise, article params override menu item params
		$this->params = $this->state->get('params');
		$active       = $app->getMenu()->getActive();
		$temp         = clone $this->params;

		// Check to see which parameters should take priority
		if ($active)
		{
			$currentLink = $active->link;

			// If the current view is the active item and an article view for this
article, then the menu item params take priority
			if (strpos($currentLink, 'view=article') &&
strpos($currentLink, '&id=' . (string) $item->id))
			{
				// Load layout from active query (in case it is an alternative menu
item)
				if (isset($active->query['layout']))
				{
					$this->setLayout($active->query['layout']);
				}
				// Check for alternative layout of article
				elseif ($layout = $item->params->get('article_layout'))
				{
					$this->setLayout($layout);
				}

				// $item->params are the article params, $temp are the menu item
params
				// Merge so that the menu item params take priority
				$item->params->merge($temp);
			}
			else
			{
				// Current view is not a single article, so the article params take
priority here
				// Merge the menu item params with the article params so that the
article params take priority
				$temp->merge($item->params);
				$item->params = $temp;

				// Check for alternative layouts (since we are not in a single-article
menu item)
				// Single-article menu item layout takes priority over alt layout for
an article
				if ($layout = $item->params->get('article_layout'))
				{
					$this->setLayout($layout);
				}
			}
		}
		else
		{
			// Merge so that article params take priority
			$temp->merge($item->params);
			$item->params = $temp;

			// Check for alternative layouts (since we are not in a single-article
menu item)
			// Single-article menu item layout takes priority over alt layout for an
article
			if ($layout = $item->params->get('article_layout'))
			{
				$this->setLayout($layout);
			}
		}

		$offset = $this->state->get('list.offset');

		// Check the view access to the article (the model has already computed
the values).
		if ($item->params->get('access-view') == false &&
($item->params->get('show_noauth', '0') ==
'0'))
		{
			$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
			$app->setHeader('status', 403, true);

			return;
		}

		/**
		 * Check for no 'access-view' and empty fulltext,
		 * - Redirect guest users to login
		 * - Deny access to logged users with 403 code
		 * NOTE: we do not recheck for no access-view + show_noauth disabled ...
since it was checked above
		 */
		if ($item->params->get('access-view') == false &&
!strlen($item->fulltext))
		{
			if ($this->user->get('guest'))
			{
				$return = base64_encode(JUri::getInstance());
				$login_url_with_return =
JRoute::_('index.php?option=com_users&view=login&return='
. $return);
				$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'notice');
				$app->redirect($login_url_with_return, 403);
			}
			else
			{
				$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
				$app->setHeader('status', 403, true);

				return;
			}
		}

		/**
		 * NOTE: The following code (usually) sets the text to contain the
fulltext, but it is the
		 * responsibility of the layout to check 'access-view' and only
use "introtext" for guests
		 */
		if ($item->params->get('show_intro', '1') ==
'1')
		{
			$item->text = $item->introtext . ' ' .
$item->fulltext;
		}
		elseif ($item->fulltext)
		{
			$item->text = $item->fulltext;
		}
		else
		{
			$item->text = $item->introtext;
		}

		$item->tags = new JHelperTags;
		$item->tags->getItemTags('com_content.article',
$this->item->id);

		if ($item->params->get('show_associations'))
		{
			$item->associations =
ContentHelperAssociation::displayAssociations($item->id);
		}

		// Process the content plugins.
		JPluginHelper::importPlugin('content');
		$dispatcher->trigger('onContentPrepare', array
('com_content.article', &$item, &$item->params,
$offset));

		$item->event = new stdClass;
		$results = $dispatcher->trigger('onContentAfterTitle',
array('com_content.article', &$item, &$item->params,
$offset));
		$item->event->afterDisplayTitle = trim(implode("\n",
$results));

		$results = $dispatcher->trigger('onContentBeforeDisplay',
array('com_content.article', &$item, &$item->params,
$offset));
		$item->event->beforeDisplayContent = trim(implode("\n",
$results));

		$results = $dispatcher->trigger('onContentAfterDisplay',
array('com_content.article', &$item, &$item->params,
$offset));
		$item->event->afterDisplayContent = trim(implode("\n",
$results));

		// Escape strings for HTML output
		$this->pageclass_sfx =
htmlspecialchars($this->item->params->get('pageclass_sfx'));

		$this->_prepareDocument();

		parent::display($tpl);
	}

	/**
	 * Prepares the document.
	 *
	 * @return  void
	 */
	protected function _prepareDocument()
	{
		$app     = JFactory::getApplication();
		$menus   = $app->getMenu();
		$pathway = $app->getPathway();
		$title   = null;

		/**
		 * Because the application sets a default page title,
		 * we need to get it from the menu item itself
		 */
		$menu = $menus->getActive();

		if ($menu)
		{
			$this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
		}
		else
		{
			$this->params->def('page_heading',
JText::_('JGLOBAL_ARTICLES'));
		}

		$title = $this->params->get('page_title', '');

		$id = (int) @$menu->query['id'];

		// If the menu item does not concern this article
		if ($menu && (!isset($menu->query['option']) ||
$menu->query['option'] !== 'com_content' ||
$menu->query['view'] !== 'article'
			|| $id != $this->item->id))
		{
			// If a browser page title is defined, use that, then fall back to the
article title if set, then fall back to the page_title option
			$title =
$this->item->params->get('article_page_title',
$this->item->title ?: $title);

			$path     = array(array('title' =>
$this->item->title, 'link' => ''));
			$category =
JCategories::getInstance('Content')->get($this->item->catid);

			while ($category && (!isset($menu->query['option'])
|| $menu->query['option'] !== 'com_content' ||
$menu->query['view'] === 'article'
				|| $id != $category->id) && $category->id > 1)
			{
				$path[]   = array('title' => $category->title,
'link' =>
ContentHelperRoute::getCategoryRoute($category->id));
				$category = $category->getParent();
			}

			$path = array_reverse($path);

			foreach ($path as $item)
			{
				$pathway->addItem($item['title'],
$item['link']);
			}
		}

		// Check for empty title and add site name if param is set
		if (empty($title))
		{
			$title = $app->get('sitename');
		}
		elseif ($app->get('sitename_pagetitles', 0) == 1)
		{
			$title = JText::sprintf('JPAGETITLE',
$app->get('sitename'), $title);
		}
		elseif ($app->get('sitename_pagetitles', 0) == 2)
		{
			$title = JText::sprintf('JPAGETITLE', $title,
$app->get('sitename'));
		}

		if (empty($title))
		{
			$title = $this->item->title;
		}

		$this->document->setTitle($title);

		if ($this->item->metadesc)
		{
			$this->document->setDescription($this->item->metadesc);
		}
		elseif ($this->params->get('menu-meta_description'))
		{
			$this->document->setDescription($this->params->get('menu-meta_description'));
		}

		if ($this->item->metakey)
		{
			$this->document->setMetadata('keywords',
$this->item->metakey);
		}
		elseif ($this->params->get('menu-meta_keywords'))
		{
			$this->document->setMetadata('keywords',
$this->params->get('menu-meta_keywords'));
		}

		if ($this->params->get('robots'))
		{
			$this->document->setMetadata('robots',
$this->params->get('robots'));
		}

		if ($app->get('MetaAuthor') == '1')
		{
			$author = $this->item->created_by_alias ?:
$this->item->author;
			$this->document->setMetaData('author', $author);
		}

		$mdata = $this->item->metadata->toArray();

		foreach ($mdata as $k => $v)
		{
			if ($v)
			{
				$this->document->setMetadata($k, $v);
			}
		}

		// If there is a pagebreak heading or title, add it to the page title
		if (!empty($this->item->page_title))
		{
			$this->item->title = $this->item->title . ' - ' .
$this->item->page_title;
			$this->document->setTitle(
				$this->item->page_title . ' - ' .
JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM',
$this->state->get('list.offset') + 1)
			);
		}

		if ($this->print)
		{
			$this->document->setMetaData('robots', 'noindex,
nofollow');
		}
	}
}
PK	��[k�D��!views/categories/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
JHtml::_('behavior.caption');
JHtml::_('behavior.core');

// Add strings for translations in Javascript.
JText::script('JGLOBAL_EXPAND_CATEGORIES');
JText::script('JGLOBAL_COLLAPSE_CATEGORIES');

JFactory::getDocument()->addScriptDeclaration("
jQuery(function($) {
	$('.categories-list').find('[id^=category-btn-]').each(function(index,
btn) {
		var btn = $(btn);
		btn.on('click', function() {
			btn.find('span').toggleClass('icon-plus');
			btn.find('span').toggleClass('icon-minus');
			if (btn.attr('aria-label') ===
Joomla.JText._('JGLOBAL_EXPAND_CATEGORIES'))
			{
				btn.attr('aria-label',
Joomla.JText._('JGLOBAL_COLLAPSE_CATEGORIES'));
			} else {
				btn.attr('aria-label',
Joomla.JText._('JGLOBAL_EXPAND_CATEGORIES'));
			}		
		});
	});
});");
?>
<div class="categories-list<?php echo $this->pageclass_sfx;
?>">
	<?php
		echo JLayoutHelper::render('joomla.content.categories_default',
$this);
		echo $this->loadTemplate('items');
	?>
</div>
PK	��[����KK!views/categories/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORIES"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORIES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
		 >
			<field 
				name="id" 
				type="category"
				label="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL"
				description="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC"
				extension="com_content"
				show_root="true"
				required="true"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
	<fieldset name="basic"
label="JGLOBAL_CATEGORIES_OPTIONS">

			<field 
				name="show_base_description" 
				type="list"
				label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL"
				description="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="categories_description" 
				type="textarea"
				label="JGLOBAL_FIELD_CATEGORIES_DESC_LABEL"
				description="JGLOBAL_FIELD_CATEGORIES_DESC_DESC"
				cols="25"
				rows="5"
			/>

			<field 
				name="maxLevelcat" 
				type="list"
				label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
				description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
				useglobal="true"
				>
				<option value="-1">JALL</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field 
				name="show_empty_categories_cat" 
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_subcat_desc_cat" 
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_cat_num_articles_cat" 
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
	</fieldset>

	<fieldset name="category"
label="JGLOBAL_CATEGORY_OPTIONS">
			<field 
				name="spacer3" 
				type="spacer" 
				label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
				class="text"
			/>

			<field 
				name="show_category_title" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_TITLE"
				description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_description" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_description_image" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="maxLevel" 
				type="list"
				label="JGLOBAL_MAXLEVEL_LABEL"
				description="JGLOBAL_MAXLEVEL_DESC"
				useglobal="true"
				>
				<option value="-1">JALL</option>
				<option value="0">JNONE</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field 
				name="show_empty_categories" 
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_no_articles" 
				type="list"
				label="COM_CONTENT_NO_ARTICLES_LABEL"
				description="COM_CONTENT_NO_ARTICLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_subcat_desc"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_cat_num_articles" 
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
	</fieldset>
	<fieldset name="blog"
label="JGLOBAL_BLOG_LAYOUT_OPTIONS">
			<field 
				name="spacer4" 
				type="spacer"
				label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
				class="text"
			/>

			<field 
				name="num_leading_articles" 
				type="number"
				label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
				description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
				size="3"
				useglobal="true"
			/>

			<field 
				name="num_intro_articles" 
				type="number"
				label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
				description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
				size="3"
				useglobal="true"
			/>

			<field 
				name="num_columns" 
				type="number"
				label="JGLOBAL_NUM_COLUMNS_LABEL"
				description="JGLOBAL_NUM_COLUMNS_DESC"
				size="3"
				useglobal="true"
			/>

			<field 
				name="num_links" 
				type="number"
				label="JGLOBAL_NUM_LINKS_LABEL"
				description="JGLOBAL_NUM_LINKS_DESC"
				size="3"
				useglobal="true"
			/>

			<field 
				name="multi_column_order" 
				type="list"
				description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
				label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
				useglobal="true"
				>
				<option value="0">JGLOBAL_DOWN</option>
				<option value="1">JGLOBAL_ACROSS</option>
			</field>

			<field 
				name="show_subcategory_content" 
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
				description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC"
				useglobal="true"
				>
				<option value="0">JNONE</option>
				<option value="-1">JALL</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field
				name="spacer5"
				type="spacer"
				hr="true"
			/>

			<field 
				name="orderby_pri" 
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				description="JGLOBAL_CATEGORY_ORDER_DESC"
				useglobal="true"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field 
				name="orderby_sec" 
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				description="JGLOBAL_ARTICLE_ORDER_DESC"
				useglobal="true"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits">JGLOBAL_LEAST_HITS</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field 
				name="order_date" 
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				description="JGLOBAL_ORDERING_DATE_DESC"
				useglobal="true"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>
	</fieldset>

	<fieldset name="advanced"
label="JGLOBAL_LIST_LAYOUT_OPTIONS" >
			<field 
				name="spacer6" 
				type="spacer" 
				label="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL"
				class="text"
			/>

			<field 
				name="show_pagination_limit" 
				type="list"
				label="JGLOBAL_DISPLAY_SELECT_LABEL"
				description="JGLOBAL_DISPLAY_SELECT_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="filter_field" 
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				description="JGLOBAL_FILTER_FIELD_DESC"
				useglobal="true"
				>
				<option value="hide">JHIDE</option>
				<option value="title">JGLOBAL_TITLE</option>
				<option value="author">JAUTHOR</option>
				<option value="hits">JGLOBAL_HITS</option>
			</field>

			<field 
				name="show_headings" 
				type="list"
				label="JGLOBAL_SHOW_HEADINGS_LABEL"
				description="JGLOBAL_SHOW_HEADINGS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="list_show_date" 
				type="list"
				label="JGLOBAL_SHOW_DATE_LABEL"
				description="JGLOBAL_SHOW_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field 
				name="date_format" 
				type="text"
				label="JGLOBAL_DATE_FORMAT_LABEL"
				description="JGLOBAL_DATE_FORMAT_DESC"
				size="15"
				useglobal="true"
			/>

			<field 
				name="list_show_hits" 
				type="list"
				label="JGLOBAL_LIST_HITS_LABEL"
				description="JGLOBAL_LIST_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="list_show_author" 
				type="list"
				label="JGLOBAL_LIST_AUTHOR_LABEL"
				description="JGLOBAL_LIST_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="display_num" 
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
				default="10"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

	</fieldset>

		<fieldset name="shared"
label="COM_CONTENT_SHARED_LABEL"
description="COM_CONTENT_SHARED_DESC">

			<field 
				name="show_pagination" 
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				description="JGLOBAL_PAGINATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field 
				name="show_pagination_results" 
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				description="JGLOBAL_PAGINATION_RESULTS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
		</fieldset>

	<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">

			<field
				name="article_layout" 
				type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field 
				name="show_title" 
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				description="JGLOBAL_SHOW_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_titles" 
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_intro" 
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				description="JGLOBAL_SHOW_INTRO_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_category" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_category" 
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				description="JGLOBAL_LINK_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_parent_category" 
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_parent_category" 
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_author" 
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				description="JGLOBAL_SHOW_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_author" 
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				description="JGLOBAL_LINK_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_create_date" 
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				description="JGLOBAL_SHOW_CREATE_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_modify_date" 
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_publish_date" 
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_item_navigation" 
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				description="JGLOBAL_SHOW_NAVIGATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="list"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				description="JGLOBAL_SHOW_VOTE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_icons" 
				type="list"
				label="JGLOBAL_SHOW_ICONS_LABEL"
				description="JGLOBAL_SHOW_ICONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_print_icon" 
				type="list"
				label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
				description="JGLOBAL_SHOW_PRINT_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_email_icon" 
				type="list"
				label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
				description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_hits" 
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				description="JGLOBAL_SHOW_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
		</field>
	</fieldset>
	<fieldset name="integration">

			<field 
				name="show_feed_link" 
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				description="JGLOBAL_SHOW_FEED_LINK_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="feed_summary" 
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				description="JGLOBAL_FEED_SUMMARY_DESC"
				useglobal="true"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
</fields>
</metadata>
PK	��[N�Z�
�
'views/categories/tmpl/default_items.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$class = ' class="first"';

if ($this->maxLevelcat != 0 &&
count($this->items[$this->parent->id]) > 0) :
?>
	<?php foreach ($this->items[$this->parent->id] as $id =>
$item) : ?>
		<?php
		if ($this->params->get('show_empty_categories_cat') ||
$item->numitems || count($item->getChildren())) :
		if (!isset($this->items[$this->parent->id][$id + 1]))
		{
			$class = ' class="last"';
		}
		?>
		<div <?php echo $class; ?> >
		<?php $class = ''; ?>
			<h3 class="page-header item-title">
				<a href="<?php echo
JRoute::_(ContentHelperRoute::getCategoryRoute($item->id,
$item->language)); ?>">
				<?php echo $this->escape($item->title); ?></a>
				<?php if
($this->params->get('show_cat_num_articles_cat') == 1)
:?>
					<span class="badge badge-info tip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_CONTENT_NUM_ITEMS_TIP'); ?>">
						<?php echo JText::_('COM_CONTENT_NUM_ITEMS');
?>&nbsp;
						<?php echo $item->numitems; ?>
					</span>
				<?php endif; ?>
				<?php if (count($item->getChildren()) > 0 &&
$this->maxLevelcat > 1) : ?>
					<a id="category-btn-<?php echo $item->id; ?>"
href="#category-<?php echo $item->id; ?>"
						data-toggle="collapse" data-toggle="button"
class="btn btn-mini pull-right" aria-label="<?php echo
JText::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
				<?php endif; ?>
			</h3>
			<?php if
($this->params->get('show_description_image') &&
$item->getParams()->get('image')) : ?>
				<img src="<?php echo
$item->getParams()->get('image'); ?>"
alt="<?php echo
htmlspecialchars($item->getParams()->get('image_alt'),
ENT_COMPAT, 'UTF-8'); ?>" />
			<?php endif; ?>
			<?php if ($this->params->get('show_subcat_desc_cat')
== 1) : ?>
				<?php if ($item->description) : ?>
					<div class="category-desc">
						<?php echo JHtml::_('content.prepare',
$item->description, '', 'com_content.categories');
?>
					</div>
				<?php endif; ?>
			<?php endif; ?>

			<?php if (count($item->getChildren()) > 0 &&
$this->maxLevelcat > 1) : ?>
				<div class="collapse fade" id="category-<?php echo
$item->id; ?>">
				<?php
				$this->items[$item->id] = $item->getChildren();
				$this->parent = $item;
				$this->maxLevelcat--;
				echo $this->loadTemplate('items');
				$this->parent = $item->getParent();
				$this->maxLevelcat++;
				?>
				</div>
			<?php endif; ?>
		</div>
		<?php endif; ?>
	<?php endforeach; ?>
<?php endif; ?>
PK	��[�����views/categories/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Content categories view.
 *
 * @since  1.5
 */
class ContentViewCategories extends JViewCategories
{
	/**
	 * Language key for default page heading
	 *
	 * @var    string
	 * @since  3.2
	 */
	protected $pageHeading = 'JGLOBAL_ARTICLES';

	/**
	 * @var    string  The name of the extension for the category
	 * @since  3.2
	 */
	protected $extension = 'com_content';
}
PK	��[�i��views/category/tmpl/blog.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

JHtml::_('behavior.caption');

$dispatcher = JEventDispatcher::getInstance();

$this->category->text = $this->category->description;
$dispatcher->trigger('onContentPrepare',
array($this->category->extension . '.categories',
&$this->category, &$this->params, 0));
$this->category->description = $this->category->text;

$results = $dispatcher->trigger('onContentAfterTitle',
array($this->category->extension . '.categories',
&$this->category, &$this->params, 0));
$afterDisplayTitle = trim(implode("\n", $results));

$results = $dispatcher->trigger('onContentBeforeDisplay',
array($this->category->extension . '.categories',
&$this->category, &$this->params, 0));
$beforeDisplayContent = trim(implode("\n", $results));

$results = $dispatcher->trigger('onContentAfterDisplay',
array($this->category->extension . '.categories',
&$this->category, &$this->params, 0));
$afterDisplayContent = trim(implode("\n", $results));

?>
<div class="blog<?php echo $this->pageclass_sfx; ?>"
itemscope itemtype="https://schema.org/Blog">
	<?php if ($this->params->get('show_page_heading')) :
?>
		<div class="page-header">
			<h1> <?php echo
$this->escape($this->params->get('page_heading')); ?>
</h1>
		</div>
	<?php endif; ?>

	<?php if ($this->params->get('show_category_title', 1)
or $this->params->get('page_subheading')) : ?>
		<h2> <?php echo
$this->escape($this->params->get('page_subheading'));
?>
			<?php if ($this->params->get('show_category_title'))
: ?>
				<span class="subheading-category"><?php echo
$this->category->title; ?></span>
			<?php endif; ?>
		</h2>
	<?php endif; ?>
	<?php echo $afterDisplayTitle; ?>

	<?php if ($this->params->get('show_cat_tags', 1)
&& !empty($this->category->tags->itemTags)) : ?>
		<?php $this->category->tagLayout = new
JLayoutFile('joomla.content.tags'); ?>
		<?php echo
$this->category->tagLayout->render($this->category->tags->itemTags);
?>
	<?php endif; ?>

	<?php if ($beforeDisplayContent || $afterDisplayContent ||
$this->params->get('show_description', 1) ||
$this->params->def('show_description_image', 1)) : ?>
		<div class="category-desc clearfix">
			<?php if
($this->params->get('show_description_image') &&
$this->category->getParams()->get('image')) : ?>
				<img src="<?php echo
$this->category->getParams()->get('image'); ?>"
alt="<?php echo
htmlspecialchars($this->category->getParams()->get('image_alt'),
ENT_COMPAT, 'UTF-8'); ?>"/>
			<?php endif; ?>
			<?php echo $beforeDisplayContent; ?>
			<?php if ($this->params->get('show_description')
&& $this->category->description) : ?>
				<?php echo JHtml::_('content.prepare',
$this->category->description, '',
'com_content.category'); ?>
			<?php endif; ?>
			<?php echo $afterDisplayContent; ?>
		</div>
	<?php endif; ?>

	<?php if (empty($this->lead_items) &&
empty($this->link_items) && empty($this->intro_items)) :
?>
		<?php if ($this->params->get('show_no_articles', 1)) :
?>
			<p><?php echo JText::_('COM_CONTENT_NO_ARTICLES');
?></p>
		<?php endif; ?>
	<?php endif; ?>

	<?php $leadingcount = 0; ?>
	<?php if (!empty($this->lead_items)) : ?>
		<div class="items-leading clearfix">
			<?php foreach ($this->lead_items as &$item) : ?>
				<div class="leading-<?php echo $leadingcount; ?><?php
echo $item->state == 0 ? ' system-unpublished' : null;
?>"
					itemprop="blogPost" itemscope
itemtype="https://schema.org/BlogPosting">
					<?php
					$this->item = &$item;
					echo $this->loadTemplate('item');
					?>
				</div>
				<?php $leadingcount++; ?>
			<?php endforeach; ?>
		</div><!-- end items-leading -->
	<?php endif; ?>

	<?php
	$introcount = count($this->intro_items);
	$counter = 0;
	?>

	<?php if (!empty($this->intro_items)) : ?>
		<?php foreach ($this->intro_items as $key => &$item) : ?>
			<?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?>
			<?php if ($rowcount === 1) : ?>
				<?php $row = $counter / $this->columns; ?>
				<div class="items-row cols-<?php echo (int)
$this->columns; ?> <?php echo 'row-' . $row; ?>
row-fluid clearfix">
			<?php endif; ?>
			<div class="span<?php echo round(12 / $this->columns);
?>">
				<div class="item column-<?php echo $rowcount; ?><?php
echo $item->state == 0 ? ' system-unpublished' : null;
?>"
					itemprop="blogPost" itemscope
itemtype="https://schema.org/BlogPosting">
					<?php
					$this->item = &$item;
					echo $this->loadTemplate('item');
					?>
				</div>
				<!-- end item -->
				<?php $counter++; ?>
			</div><!-- end span -->
			<?php if (($rowcount == $this->columns) or ($counter ==
$introcount)) : ?>
				</div><!-- end row -->
			<?php endif; ?>
		<?php endforeach; ?>
	<?php endif; ?>

	<?php if (!empty($this->link_items)) : ?>
		<div class="items-more">
			<?php echo $this->loadTemplate('links'); ?>
		</div>
	<?php endif; ?>

	<?php if ($this->maxLevel != 0 &&
!empty($this->children[$this->category->id])) : ?>
		<div class="cat-children">
			<?php if
($this->params->get('show_category_heading_title_text', 1)
== 1) : ?>
				<h3> <?php echo JText::_('JGLOBAL_SUBCATEGORIES');
?> </h3>
			<?php endif; ?>
			<?php echo $this->loadTemplate('children'); ?>
</div>
	<?php endif; ?>
	<?php if (($this->params->def('show_pagination', 1) ==
1 || ($this->params->get('show_pagination') == 2))
&& ($this->pagination->get('pages.total') > 1))
: ?>
		<div class="pagination">
			<?php if
($this->params->def('show_pagination_results', 1)) : ?>
				<p class="counter pull-right"> <?php echo
$this->pagination->getPagesCounter(); ?> </p>
			<?php endif; ?>
			<?php echo $this->pagination->getPagesLinks(); ?>
</div>
	<?php endif; ?>
</div>
PK	��[v/��K�Kviews/category/tmpl/blog.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
		<help key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_BLOG"
/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field
				name="id"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				description="JGLOBAL_CHOOSE_CATEGORY_DESC"
				extension="com_content"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>

			<field
				name="filter_tag"
				type="tag"
				label="JTAG"
				description="JTAG_FIELD_SELECT_DESC"
				multiple="true"
				mode="nested"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="basic"
label="JGLOBAL_CATEGORY_OPTIONS">
				<field
					name="layout_type"
					type="hidden"
					default="blog"
				/>

				<field
					name="show_category_heading_title_text"
					type="list"
	 				label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL"
					description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_category_title"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_TITLE"
					description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_description"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
					description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_description_image"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
					description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="maxLevel"
					type="list"
					label="JGLOBAL_MAXLEVEL_LABEL"
					description="JGLOBAL_MAXLEVEL_DESC"
					useglobal="true"
					>
					<option value="-1">JALL</option>
					<option value="0">JNONE</option>
					<option value="1">J1</option>
					<option value="2">J2</option>
					<option value="3">J3</option>
					<option value="4">J4</option>
					<option value="5">J5</option>
				</field>

				<field
					name="show_empty_categories"
					type="list"
					label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
					description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_no_articles"
					type="list"
					label="COM_CONTENT_NO_ARTICLES_LABEL"
					description="COM_CONTENT_NO_ARTICLES_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_subcat_desc"
					type="list"
					label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
					description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_cat_num_articles"
					type="list"
					label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
					description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_cat_tags"
					type="list"
					label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
					description="COM_CONTENT_FIELD_SHOW_CAT_TAGS_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="page_subheading"
					type="text"
					label="JGLOBAL_SUBHEADING_LABEL"
					description="JGLOBAL_SUBHEADING_DESC"
					size="20"
				/>
		</fieldset>

		<fieldset name="advanced"
label="JGLOBAL_BLOG_LAYOUT_OPTIONS">
				<field
					name="bloglayout"
					type="spacer"
					label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL"
					class="text"
				/>

				<field
					name="num_leading_articles"
					type="number"
					label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
					description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
					useglobal="true"
					size="3"
				/>

				<field
					name="num_intro_articles"
					type="number"
					label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
					description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
					useglobal="true"
					size="3"
				/>

				<field
					name="num_columns"
					type="number"
					label="JGLOBAL_NUM_COLUMNS_LABEL"
					description="JGLOBAL_NUM_COLUMNS_DESC"
					useglobal="true"
					size="3"
				/>

				<field
					name="num_links"
					type="number"
					label="JGLOBAL_NUM_LINKS_LABEL"
					description="JGLOBAL_NUM_LINKS_DESC"
					useglobal="true"
					size="3"
				/>

				<field
					name="multi_column_order"
					type="list"
					label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
					description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
					useglobal="true"
					>
					<option value="0">JGLOBAL_DOWN</option>
					<option value="1">JGLOBAL_ACROSS</option>
				</field>

				<field
					name="show_subcategory_content"
					type="list"
					label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
					description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC"
					useglobal="true"
					>
					<option value="0">JNONE</option>
					<option value="-1">JALL</option>
					<option value="1">J1</option>
					<option value="2">J2</option>
					<option value="3">J3</option>
					<option value="4">J4</option>
					<option value="5">J5</option>
				</field>

				<field
					name="spacer1"
					type="spacer"
					hr="true"
				/>

				<field
					name="orderby_pri"
					type="list"
					label="JGLOBAL_CATEGORY_ORDER_LABEL"
					description="JGLOBAL_CATEGORY_ORDER_DESC"
					useglobal="true"
					>
					<option value="none">JGLOBAL_NO_ORDER</option>
					<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
					<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
					<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
				</field>

				<field
					name="orderby_sec"
					type="list"
					label="JGLOBAL_ARTICLE_ORDER_LABEL"
					description="JGLOBAL_ARTICLE_ORDER_DESC"
					useglobal="true"
					>
					<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
					<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
					<option
value="date">JGLOBAL_OLDEST_FIRST</option>
					<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
					<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
					<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
					<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
					<option value="hits">JGLOBAL_MOST_HITS</option>
					<option
value="rhits">JGLOBAL_LEAST_HITS</option>
					<option
value="random">JGLOBAL_RANDOM_ORDER</option>
					<option value="order">JGLOBAL_ORDERING</option>
					<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
					<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
					<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
					<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
					<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
				</field>

				<field
					name="order_date"
					type="list"
					label="JGLOBAL_ORDERING_DATE_LABEL"
					description="JGLOBAL_ORDERING_DATE_DESC"
					useglobal="true"
					>
					<option value="created">JGLOBAL_CREATED</option>
					<option
value="modified">JGLOBAL_MODIFIED</option>
					<option value="published">JPUBLISHED</option>
					<option
value="unpublished">JUNPUBLISHED</option>
				</field>

				<field
					name="show_pagination"
					type="list"
					label="JGLOBAL_PAGINATION_LABEL"
					description="JGLOBAL_PAGINATION_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
					<option value="2">JGLOBAL_AUTO</option>
				</field>

				<field
					name="show_pagination_results"
					type="list"
					label="JGLOBAL_PAGINATION_RESULTS_LABEL"
					description="JGLOBAL_PAGINATION_RESULTS_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_featured"
					type="list"
					default=""
					label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
					description="JGLOBAL_SHOW_FEATURED_ARTICLES_DESC"
					useglobal="true"
					class="chzn-color"
					>
					<option value="show">JSHOW</option>
					<option value="hide">JHIDE</option>
					<option value="only">JONLY</option>
				</field>
		</fieldset>

		<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">

			<field
				name="article_layout" type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				description="JGLOBAL_SHOW_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				description="JGLOBAL_SHOW_INTRO_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"
				default=""
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				description="JGLOBAL_LINK_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_associations"
				type="list"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				description="JGLOBAL_SHOW_ASSOCIATIONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				description="JGLOBAL_SHOW_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				description="JGLOBAL_LINK_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				description="JGLOBAL_SHOW_CREATE_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				description="JGLOBAL_SHOW_NAVIGATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="list"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				description="JGLOBAL_SHOW_VOTE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_icons"
				type="list"
				label="JGLOBAL_SHOW_ICONS_LABEL"
				description="JGLOBAL_SHOW_ICONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_print_icon"
				type="list"
				label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
				description="JGLOBAL_SHOW_PRINT_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_email_icon"
				type="list"
				label="JGLOBAL_Show_Email_Icon_Label"
				description="JGLOBAL_Show_Email_Icon_Desc"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				description="JGLOBAL_SHOW_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_tags"
				type="list"
				label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
				description="COM_CONTENT_FIELD_SHOW_TAGS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>

		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
			<field
				name="show_feed_link"
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				description="JGLOBAL_SHOW_FEED_LINK_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="feed_summary"
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				description="JGLOBAL_FEED_SUMMARY_DESC"
				useglobal="true"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK	��[&#�
%views/category/tmpl/blog_children.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$class  = ' class="first"';
$lang   = JFactory::getLanguage();
$user   = JFactory::getUser();
$groups = $user->getAuthorisedViewLevels();

if ($this->maxLevel != 0 &&
count($this->children[$this->category->id]) > 0) : ?>

	<?php foreach ($this->children[$this->category->id] as $id
=> $child) : ?>
		<?php // Check whether category access level allows access to
subcategories. ?>
		<?php if (in_array($child->access, $groups)) : ?>
			<?php if ($this->params->get('show_empty_categories')
|| $child->numitems || count($child->getChildren())) :
				if (!isset($this->children[$this->category->id][$id + 1])) :
					$class = ' class="last"';
				endif;
			?>
			<div<?php echo $class; ?>>
				<?php $class = ''; ?>
				<?php if ($lang->isRtl()) : ?>
				<h3 class="page-header item-title">
					<?php if (
$this->params->get('show_cat_num_articles', 1)) : ?>
						<span class="badge badge-info tip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_CONTENT_NUM_ITEMS_TIP'); ?>">
							<?php echo $child->getNumItems(true); ?>
						</span>
					<?php endif; ?>
					<a href="<?php echo
JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));
?>">
					<?php echo $this->escape($child->title); ?></a>

					<?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
						<a href="#category-<?php echo $child->id; ?>"
data-toggle="collapse" data-toggle="button"
class="btn btn-mini pull-right" aria-label="<?php echo
JText::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
					<?php endif; ?>
				</h3>
				<?php else : ?>
				<h3 class="page-header item-title"><a
href="<?php echo
JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));
?>">
					<?php echo $this->escape($child->title); ?></a>
					<?php if (
$this->params->get('show_cat_num_articles', 1)) : ?>
						<span class="badge badge-info tip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_CONTENT_NUM_ITEMS_TIP'); ?>">
							<?php echo JText::_('COM_CONTENT_NUM_ITEMS');
?>&nbsp;
							<?php echo $child->getNumItems(true); ?>
						</span>
					<?php endif; ?>

					<?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
						<a href="#category-<?php echo $child->id; ?>"
data-toggle="collapse" data-toggle="button"
class="btn btn-mini pull-right" aria-label="<?php echo
JText::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
					<?php endif; ?>
				</h3>
				<?php endif; ?>

				<?php if ($this->params->get('show_subcat_desc') ==
1) : ?>
					<?php if ($child->description) : ?>
						<div class="category-desc">
							<?php echo JHtml::_('content.prepare',
$child->description, '', 'com_content.category');
?>
						</div>
					<?php endif; ?>
				<?php endif; ?>

				<?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
					<div class="collapse fade" id="category-<?php
echo $child->id; ?>">
						<?php
						$this->children[$child->id] = $child->getChildren();
						$this->category = $child;
						$this->maxLevel--;
						echo $this->loadTemplate('children');
						$this->category = $child->getParent();
						$this->maxLevel++;
						?>
					</div>
				<?php endif; ?>
			</div>
			<?php endif; ?>
		<?php endif; ?>
	<?php endforeach; ?>

<?php endif;
PK	��[j�>LL!views/category/tmpl/blog_item.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Create a shortcut for params.
$params = $this->item->params;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
$canEdit = $this->item->params->get('access-edit');
$info    = $params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the
parameter.
$assocParam = (JLanguageAssociations::isEnabled() &&
$params->get('show_associations'));

$currentDate   = JFactory::getDate()->format('Y-m-d H:i:s');
$isUnpublished = ($this->item->state == 0 ||
$this->item->publish_up > $currentDate)
	|| ($this->item->publish_down < $currentDate &&
$this->item->publish_down !== JFactory::getDbo()->getNullDate());

?>
<?php if ($isUnpublished) : ?>
	<div class="system-unpublished">
<?php endif; ?>

<?php echo
JLayoutHelper::render('joomla.content.blog_style_default_item_title',
$this->item); ?>

<?php if ($canEdit || $params->get('show_print_icon') ||
$params->get('show_email_icon')) : ?>
	<?php echo JLayoutHelper::render('joomla.content.icons',
array('params' => $params, 'item' =>
$this->item, 'print' => false)); ?>
<?php endif; ?>

<?php // Todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
	|| $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam); ?>

<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
	<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
	<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'above')); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags',
1) && !empty($this->item->tags->itemTags)) : ?>
	<?php echo JLayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
<?php endif; ?>

<?php echo JLayoutHelper::render('joomla.content.intro_image',
$this->item); ?>

<?php if (!$params->get('show_intro')) : ?>
	<?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
	<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>

<?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>

<?php echo $this->item->introtext; ?>

<?php if ($info == 1 || $info == 2) : ?>
	<?php if ($useDefList) : ?>
		<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
		<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'below')); ?>
	<?php endif; ?>
	<?php if ($params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
		<?php echo JLayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
	<?php endif; ?>
<?php endif; ?>

<?php if ($params->get('show_readmore') &&
$this->item->readmore) :
	if ($params->get('access-view')) :
		$link =
JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language));
	else :
		$menu = JFactory::getApplication()->getMenu();
		$active = $menu->getActive();
		$itemId = $active->id;
		$link = new
JUri(JRoute::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
		$link->setVar('return',
base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)));
	endif; ?>

	<?php echo JLayoutHelper::render('joomla.content.readmore',
array('item' => $this->item, 'params' =>
$params, 'link' => $link)); ?>

<?php endif; ?>

<?php if ($isUnpublished) : ?>
	</div>
<?php endif; ?>

<?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
PK	��[��/�//"views/category/tmpl/blog_links.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<ol class="nav nav-tabs nav-stacked">
	<?php foreach ($this->link_items as &$item) : ?>
		<li>
			<a href="<?php echo
JRoute::_(ContentHelperRoute::getArticleRoute($item->slug,
$item->catid, $item->language)); ?>">
				<?php echo $item->title; ?></a>
		</li>
	<?php endforeach; ?>
</ol>
PK	��[MaJ� 
views/category/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

JHtml::_('behavior.caption');
?>
<div class="category-list<?php echo $this->pageclass_sfx;
?>">

<?php
$this->subtemplatename = 'articles';
echo JLayoutHelper::render('joomla.content.category_default',
$this);
?>

</div>
PK	��[���P3E3Eviews/category/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORY_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CATEGORY_LIST"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field 
				name="id"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				description="JGLOBAL_CHOOSE_CATEGORY_DESC"
				extension="com_content"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>

			<field
				name="filter_tag"
				type="tag"
				label="JTAG"
				description="JTAG_FIELD_SELECT_DESC"
				multiple="true"
				mode="nested"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="basic"
label="JGLOBAL_CATEGORY_OPTIONS">

			<field 
				name="show_category_title" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_TITLE"
				description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_description" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_description_image" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="maxLevel" 
				type="list"
				label="JGLOBAL_MAXLEVEL_LABEL"
				description="JGLOBAL_MAXLEVEL_DESC"
				useglobal="true"
				>
				<option value="-1">JALL</option>
				<option value="0">JNONE</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field 
				name="show_empty_categories" 
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_no_articles" 
				type="list"
				label="COM_CONTENT_NO_ARTICLES_LABEL"
				description="COM_CONTENT_NO_ARTICLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_category_heading_title_text"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_subcat_desc" 
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_cat_num_articles" 
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_cat_tags" 
				type="list"
				label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
				description="COM_CONTENT_FIELD_SHOW_CAT_TAGS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="page_subheading" 
				type="text"
				label="JGLOBAL_SUBHEADING_LABEL"
				description="JGLOBAL_SUBHEADING_DESC"
				size="20"
			/>

		</fieldset>

		<fieldset name="advanced"
label="JGLOBAL_LIST_LAYOUT_OPTIONS">
			<field 
				name="show_pagination_limit" 
				type="list"
				label="JGLOBAL_DISPLAY_SELECT_LABEL"
				description="JGLOBAL_DISPLAY_SELECT_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="filter_field" 
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				description="JGLOBAL_FILTER_FIELD_DESC"
				useglobal="true"
				>
				<option value="hide">JHIDE</option>
				<option value="title">JGLOBAL_TITLE</option>
				<option value="author">JAUTHOR</option>
				<option value="hits">JGLOBAL_HITS</option>
	 			<option value="tag">JTAG</option>
	 			<option value="month">JMONTH_PUBLISHED</option>
			</field>

			<field 
				name="show_headings" 
				type="list"
				label="JGLOBAL_SHOW_HEADINGS_LABEL"
				description="JGLOBAL_SHOW_HEADINGS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="list_show_date" 
				type="list"
				label="JGLOBAL_SHOW_DATE_LABEL"
				description="JGLOBAL_SHOW_DATE_DESC"
				useglobal="true"
				>
				<option value="0">JHIDE</option>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field 
				name="date_format" 
				type="text"
				label="JGLOBAL_DATE_FORMAT_LABEL"
				description="JGLOBAL_DATE_FORMAT_DESC"
				size="15"
				useglobal="true"
			/>

			<field 
				name="list_show_hits" 
				type="list"
				label="JGLOBAL_LIST_HITS_LABEL"
				description="JGLOBAL_LIST_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="list_show_author" 
				type="list"
				label="JGLOBAL_LIST_AUTHOR_LABEL"
				description="JGLOBAL_LIST_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="list_show_votes"
				type="list"
				label="JGLOBAL_LIST_VOTES_LABEL"
				description="JGLOBAL_LIST_VOTES_DESC"
				class="btn-group btn-group-yesno"
				useglobal="true"
				>
				<option value="1"
requires="vote">JSHOW</option>
				<option value="0"
requires="vote">JHIDE</option>
			</field>

			<field 
				name="list_show_ratings"
				type="list"
				label="JGLOBAL_LIST_RATINGS_LABEL"
				description="JGLOBAL_LIST_RATINGS_DESC"
				class="btn-group btn-group-yesno"
				useglobal="true"
				>
				<option value="1"
requires="vote">JSHOW</option>
				<option value="0"
requires="vote">JHIDE</option>
			</field>

			<field
				name="spacer1"
				type="spacer"
				hr="true"
			/>

			<field 
				name="orderby_pri" 
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				description="JGLOBAL_CATEGORY_ORDER_DESC"
				useglobal="true"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field 
				name="orderby_sec" 
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				description="JGLOBAL_ARTICLE_ORDER_DESC"
				useglobal="true"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits">JGLOBAL_LEAST_HITS</option>
				<option
value="random">JGLOBAL_RANDOM_ORDER</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank" requires="vote">
JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field 
				name="order_date" 
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				description="JGLOBAL_ORDERING_DATE_DESC"
				useglobal="true"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field 
				name="show_pagination" 
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				description="JGLOBAL_PAGINATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field 
				name="show_pagination_results" 
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				description="JGLOBAL_PAGINATION_RESULTS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="display_num" 
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				description="JGLOBAL_NUMBER_ITEMS_LIST_DESC"
				default="10"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

			<field 
				name="show_featured" 
				type="list" 
				label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
				description="JGLOBAL_SHOW_FEATURED_ARTICLES_DESC"
				useglobal="true"
				default=""
				>
				<option value="show">JSHOW</option>
				<option value="hide">JHIDE</option>
				<option value="only">JONLY</option>
			</field>
		</fieldset>

		<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">

			<field
				name="article_layout" type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field 
				name="show_title" 
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				description="JGLOBAL_SHOW_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_titles" 
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_intro" 
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				description="JGLOBAL_SHOW_INTRO_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_category" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_category" 
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				description="JGLOBAL_LINK_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"				
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_parent_category" 
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_parent_category" 
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
			
			<field
				name="show_associations"
				type="list"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				description="JGLOBAL_SHOW_ASSOCIATIONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field 
				name="show_author" 
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				description="JGLOBAL_SHOW_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_author" 
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				description="JGLOBAL_LINK_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_create_date" 
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				description="JGLOBAL_SHOW_CREATE_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_modify_date" 
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_publish_date" 
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_item_navigation" 
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				description="JGLOBAL_SHOW_NAVIGATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote" 
				type="list"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				description="JGLOBAL_SHOW_VOTE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_icons" 
				type="list"
				label="JGLOBAL_SHOW_ICONS_LABEL"
				description="JGLOBAL_SHOW_ICONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_print_icon" 
				type="list"
				label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
				description="JGLOBAL_SHOW_PRINT_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_email_icon" 
				type="list"
				label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
				description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_hits" 
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				description="JGLOBAL_SHOW_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_noauth" 
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>
		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">

			<field 
				name="show_feed_link" 
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				description="JGLOBAL_SHOW_FEED_LINK_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="feed_summary" 
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				description="JGLOBAL_FEED_SUMMARY_DESC"
				useglobal="true"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK	��[���}�5�5(views/category/tmpl/default_articles.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Multilanguage;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

// Create some shortcuts.
$n          = count($this->items);
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$langFilter = false;

// Tags filtering based on language filter
if (($this->params->get('filter_field') ===
'tag') && (Multilanguage::isEnabled()))
{
	$tagfilter =
ComponentHelper::getParams('com_tags')->get('tag_list_language_filter');

	switch ($tagfilter)
	{
		case 'current_language' :
			$langFilter = JFactory::getApplication()->getLanguage()->getTag();
			break;

		case 'all' :
			$langFilter = false;
			break;

		default :
			$langFilter = $tagfilter;
	}
}

// Check for at least one editable article
$isEditable = false;

if (!empty($this->items))
{
	foreach ($this->items as $article)
	{
		if ($article->params->get('access-edit'))
		{
			$isEditable = true;
			break;
		}
	}
}

// For B/C we also add the css classes inline. This will be removed in 4.0.
JFactory::getDocument()->addStyleDeclaration('
.hide { display: none; }
.table-noheader { border-collapse: collapse; }
.table-noheader thead { display: none; }
');

$tableClass = $this->params->get('show_headings') != 1 ?
' table-noheader' : '';

$nullDate    = JFactory::getDbo()->getNullDate();
$currentDate = JFactory::getDate()->format('Y-m-d H:i:s');

?>
<form action="<?php echo
htmlspecialchars(JUri::getInstance()->toString()); ?>"
method="post" name="adminForm" id="adminForm"
class="form-inline">
<?php if ($this->params->get('filter_field') !==
'hide' ||
$this->params->get('show_pagination_limit')) : ?>
	<fieldset class="filters btn-toolbar clearfix">
		<legend class="hide"><?php echo
JText::_('COM_CONTENT_FORM_FILTER_LEGEND'); ?></legend>
		<?php if ($this->params->get('filter_field') !==
'hide') : ?>
			<div class="btn-group">
				<?php if ($this->params->get('filter_field') ===
'tag') : ?>
					<select name="filter_tag" id="filter_tag"
onchange="document.adminForm.submit();">
						<option value=""><?php echo
JText::_('JOPTION_SELECT_TAG'); ?></option>
						<?php echo JHtml::_('select.options',
JHtml::_('tag.options', array('filter.published' =>
array(1), 'filter.language' => $langFilter), true),
'value', 'text',
$this->state->get('filter.tag')); ?>
					</select>
				<?php elseif ($this->params->get('filter_field') ===
'month') : ?>
					<select name="filter-search" id="filter-search"
onchange="document.adminForm.submit();">
						<option value=""><?php echo
JText::_('JOPTION_SELECT_MONTH'); ?></option>
						<?php echo JHtml::_('select.options',
JHtml::_('content.months', $this->state), 'value',
'text', $this->state->get('list.filter')); ?>
					</select>
				<?php else : ?>
					<label class="filter-search-lbl element-invisible"
for="filter-search">
						<?php echo JText::_('COM_CONTENT_' .
$this->params->get('filter_field') .
'_FILTER_LABEL') . '&#160;'; ?>
					</label>
					<input type="text" name="filter-search"
id="filter-search" value="<?php echo
$this->escape($this->state->get('list.filter'));
?>" class="inputbox"
onchange="document.adminForm.submit();" title="<?php echo
JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?>"
placeholder="<?php echo JText::_('COM_CONTENT_' .
$this->params->get('filter_field') .
'_FILTER_LABEL'); ?>" />
				<?php endif; ?>
			</div>
		<?php endif; ?>
		<?php if ($this->params->get('show_pagination_limit'))
: ?>
			<div class="btn-group pull-right">
				<label for="limit" class="element-invisible">
					<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
				</label>
				<?php echo $this->pagination->getLimitBox(); ?>
			</div>
		<?php endif; ?>

		<input type="hidden" name="filter_order"
value="" />
		<input type="hidden" name="filter_order_Dir"
value="" />
		<input type="hidden" name="limitstart"
value="" />
		<input type="hidden" name="task"
value="" />
	</fieldset>

	<div class="control-group hide pull-right">
		<div class="controls">
			<button type="submit" name="filter_submit"
class="btn btn-primary"><?php echo
JText::_('COM_CONTENT_FORM_FILTER_SUBMIT'); ?></button>
		</div>
	</div>

<?php endif; ?>

<?php if (empty($this->items)) : ?>
	<?php if ($this->params->get('show_no_articles', 1)) :
?>
		<p><?php echo JText::_('COM_CONTENT_NO_ARTICLES');
?></p>
	<?php endif; ?>
<?php else : ?>
	<table class="category table table-striped table-bordered
table-hover<?php echo $tableClass; ?>">
		<caption class="hide"><?php echo
JText::sprintf('COM_CONTENT_CATEGORY_LIST_TABLE_CAPTION',
$this->category->title); ?></caption>
		<thead>
			<tr>
				<th scope="col"
id="categorylist_header_title">
					<?php echo JHtml::_('grid.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder,
null, 'asc', '', 'adminForm'); ?>
				</th>
				<?php if ($date =
$this->params->get('list_show_date')) : ?>
					<th scope="col"
id="categorylist_header_date">
						<?php if ($date === 'created') : ?>
							<?php echo JHtml::_('grid.sort',
'COM_CONTENT_' . $date . '_DATE',
'a.created', $listDirn, $listOrder); ?>
						<?php elseif ($date === 'modified') : ?>
							<?php echo JHtml::_('grid.sort',
'COM_CONTENT_' . $date . '_DATE',
'a.modified', $listDirn, $listOrder); ?>
						<?php elseif ($date === 'published') : ?>
							<?php echo JHtml::_('grid.sort',
'COM_CONTENT_' . $date . '_DATE',
'a.publish_up', $listDirn, $listOrder); ?>
						<?php endif; ?>
					</th>
				<?php endif; ?>
				<?php if ($this->params->get('list_show_author')) :
?>
					<th scope="col"
id="categorylist_header_author">
						<?php echo JHtml::_('grid.sort', 'JAUTHOR',
'author', $listDirn, $listOrder); ?>
					</th>
				<?php endif; ?>
				<?php if ($this->params->get('list_show_hits')) :
?>
					<th scope="col"
id="categorylist_header_hits">
						<?php echo JHtml::_('grid.sort',
'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
					</th>
				<?php endif; ?>
				<?php if ($this->params->get('list_show_votes', 0)
&& $this->vote) : ?>
					<th scope="col"
id="categorylist_header_votes">
						<?php echo JHtml::_('grid.sort',
'COM_CONTENT_VOTES', 'rating_count', $listDirn,
$listOrder); ?>
					</th>
				<?php endif; ?>
				<?php if ($this->params->get('list_show_ratings', 0)
&& $this->vote) : ?>
					<th scope="col"
id="categorylist_header_ratings">
						<?php echo JHtml::_('grid.sort',
'COM_CONTENT_RATINGS', 'rating', $listDirn,
$listOrder); ?>
					</th>
				<?php endif; ?>
				<?php if ($isEditable) : ?>
					<th scope="col"
id="categorylist_header_edit"><?php echo
JText::_('COM_CONTENT_EDIT_ITEM'); ?></th>
				<?php endif; ?>
			</tr>
		</thead>
		<tbody>
		<?php foreach ($this->items as $i => $article) : ?>
			<?php if ($this->items[$i]->state == 0) : ?>
				<tr class="system-unpublished cat-list-row<?php echo $i % 2;
?>">
			<?php else : ?>
				<tr class="cat-list-row<?php echo $i % 2; ?>" >
			<?php endif; ?>
			<td headers="categorylist_header_title"
class="list-title">
				<?php if (in_array($article->access,
$this->user->getAuthorisedViewLevels())) : ?>
					<a href="<?php echo
JRoute::_(ContentHelperRoute::getArticleRoute($article->slug,
$article->catid, $article->language)); ?>">
						<?php echo $this->escape($article->title); ?>
					</a>
					<?php if (JLanguageAssociations::isEnabled() &&
$this->params->get('show_associations')) : ?>
						<?php $associations =
ContentHelperAssociation::displayAssociations($article->id); ?>
						<?php foreach ($associations as $association) : ?>
							<?php if ($this->params->get('flags', 1)
&& $association['language']->image) : ?>
								<?php $flag = JHtml::_('image',
'mod_languages/' . $association['language']->image .
'.gif', $association['language']->title_native,
array('title' =>
$association['language']->title_native), true); ?>
								&nbsp;<a href="<?php echo
JRoute::_($association['item']); ?>"><?php echo
$flag; ?></a>&nbsp;
							<?php else : ?>
								<?php $class = 'label label-association label-' .
$association['language']->sef; ?>
								&nbsp;<a class="<?php echo $class; ?>"
href="<?php echo JRoute::_($association['item']);
?>"><?php echo
strtoupper($association['language']->sef);
?></a>&nbsp;
							<?php endif; ?>
						<?php endforeach; ?>
					<?php endif; ?>
				<?php else : ?>
					<?php
					echo $this->escape($article->title) . ' : ';
					$menu   = JFactory::getApplication()->getMenu();
					$active = $menu->getActive();
					$itemId = $active->id;
					$link   = new
JUri(JRoute::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
					$link->setVar('return',
base64_encode(ContentHelperRoute::getArticleRoute($article->slug,
$article->catid, $article->language)));
					?>
					<a href="<?php echo $link; ?>"
class="register">
						<?php echo
JText::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
					</a>
					<?php if (JLanguageAssociations::isEnabled() &&
$this->params->get('show_associations')) : ?>
						<?php $associations =
ContentHelperAssociation::displayAssociations($article->id); ?>
						<?php foreach ($associations as $association) : ?>
							<?php if ($this->params->get('flags', 1)) : ?>
								<?php $flag = JHtml::_('image',
'mod_languages/' . $association['language']->image .
'.gif', $association['language']->title_native,
array('title' =>
$association['language']->title_native), true); ?>
								&nbsp;<a href="<?php echo
JRoute::_($association['item']); ?>"><?php echo
$flag; ?></a>&nbsp;
							<?php else : ?>
								<?php $class = 'label label-association label-' .
$association['language']->sef; ?>
								&nbsp;<a class="' . <?php echo $class; ?> .
'" href="<?php echo
JRoute::_($association['item']); ?>"><?php echo
strtoupper($association['language']->sef);
?></a>&nbsp;
							<?php endif; ?>
						<?php endforeach; ?>
					<?php endif; ?>
				<?php endif; ?>
				<?php if ($article->state == 0) : ?>
					<span class="list-published label label-warning">
								<?php echo JText::_('JUNPUBLISHED'); ?>
							</span>
				<?php endif; ?>
				<?php if ($article->publish_up > $currentDate) : ?>
					<span class="list-published label label-warning">
								<?php echo JText::_('JNOTPUBLISHEDYET'); ?>
							</span>
				<?php endif; ?>
				<?php if ($article->publish_down < $currentDate &&
$article->publish_down !== $nullDate) : ?>
					<span class="list-published label label-warning">
								<?php echo JText::_('JEXPIRED'); ?>
							</span>
				<?php endif; ?>
			</td>
			<?php if ($this->params->get('list_show_date')) :
?>
				<td headers="categorylist_header_date"
class="list-date small">
					<?php
					echo JHtml::_(
						'date', $article->displayDate,
						$this->escape($this->params->get('date_format',
JText::_('DATE_FORMAT_LC3')))
					); ?>
				</td>
			<?php endif; ?>
			<?php if ($this->params->get('list_show_author', 1))
: ?>
				<td headers="categorylist_header_author"
class="list-author">
					<?php if (!empty($article->author) ||
!empty($article->created_by_alias)) : ?>
						<?php $author = $article->author ?>
						<?php $author = $article->created_by_alias ?: $author; ?>
						<?php if (!empty($article->contact_link) &&
$this->params->get('link_author') == true) : ?>
							<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
JHtml::_('link', $article->contact_link, $author)); ?>
						<?php else : ?>
							<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY',
$author); ?>
						<?php endif; ?>
					<?php endif; ?>
				</td>
			<?php endif; ?>
			<?php if ($this->params->get('list_show_hits', 1)) :
?>
				<td headers="categorylist_header_hits"
class="list-hits">
							<span class="badge badge-info">
								<?php echo JText::sprintf('JGLOBAL_HITS_COUNT',
$article->hits); ?>
							</span>
						</td>
			<?php endif; ?>
			<?php if ($this->params->get('list_show_votes', 0)
&& $this->vote) : ?>
				<td headers="categorylist_header_votes"
class="list-votes">
					<span class="badge badge-success">
						<?php echo JText::sprintf('COM_CONTENT_VOTES_COUNT',
$article->rating_count); ?>
					</span>
				</td>
			<?php endif; ?>
			<?php if ($this->params->get('list_show_ratings', 0)
&& $this->vote) : ?>
				<td headers="categorylist_header_ratings"
class="list-ratings">
					<span class="badge badge-warning">
						<?php echo JText::sprintf('COM_CONTENT_RATINGS_COUNT',
$article->rating); ?>
					</span>
				</td>
			<?php endif; ?>
			<?php if ($isEditable) : ?>
				<td headers="categorylist_header_edit"
class="list-edit">
					<?php if ($article->params->get('access-edit')) :
?>
						<?php echo JHtml::_('icon.edit', $article,
$article->params); ?>
					<?php endif; ?>
				</td>
			<?php endif; ?>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
<?php endif; ?>

<?php // Code to add a link to submit an article. ?>
<?php if
($this->category->getParams()->get('access-create')) :
?>
	<?php echo JHtml::_('icon.create', $this->category,
$this->category->params); ?>
<?php endif; ?>

<?php // Add pagination links ?>
<?php if (!empty($this->items)) : ?>
	<?php if (($this->params->def('show_pagination', 2) ==
1  || ($this->params->get('show_pagination') == 2))
&& ($this->pagination->pagesTotal > 1)) : ?>
		<div class="pagination">

			<?php if
($this->params->def('show_pagination_results', 1)) : ?>
				<p class="counter pull-right">
					<?php echo $this->pagination->getPagesCounter(); ?>
				</p>
			<?php endif; ?>

			<?php echo $this->pagination->getPagesLinks(); ?>
		</div>
	<?php endif; ?>
<?php endif; ?>
</form>
PK	��[�v�X�
�
(views/category/tmpl/default_children.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip');

$class  = ' class="first"';
$lang   = JFactory::getLanguage();
$user   = JFactory::getUser();
$groups = $user->getAuthorisedViewLevels();
?>

<?php if (count($this->children[$this->category->id]) > 0) :
?>

	<?php foreach ($this->children[$this->category->id] as $id
=> $child) : ?>
		<?php // Check whether category access level allows access to
subcategories. ?>
		<?php if (in_array($child->access, $groups)) : ?>
			<?php
			if ($this->params->get('show_empty_categories') ||
$child->getNumItems(true) || count($child->getChildren())) :
				if (!isset($this->children[$this->category->id][$id + 1])) :
					$class = ' class="last"';
				endif;
			?>

			<div<?php echo $class; ?>>
				<?php $class = ''; ?>
				<?php if ($lang->isRtl()) : ?>
				<h3 class="page-header item-title">
					<?php if (
$this->params->get('show_cat_num_articles', 1)) : ?>
						<span class="badge badge-info tip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_CONTENT_NUM_ITEMS_TIP'); ?>">
							<?php echo $child->getNumItems(true); ?>
						</span>
					<?php endif; ?>
					<a href="<?php echo
JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));
?>">
					<?php echo $this->escape($child->title); ?></a>

					<?php if (count($child->getChildren()) > 0 &&
$this->maxLevel > 1) : ?>
						<a href="#category-<?php echo $child->id; ?>"
data-toggle="collapse" data-toggle="button"
class="btn btn-mini pull-right" aria-label="<?php echo
JText::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
					<?php endif; ?>
				</h3>
				<?php else : ?>
				<h3 class="page-header item-title"><a
href="<?php echo
JRoute::_(ContentHelperRoute::getCategoryRoute($child->id));
?>">
					<?php echo $this->escape($child->title); ?></a>
					<?php if (
$this->params->get('show_cat_num_articles', 1)) : ?>
						<span class="badge badge-info tip hasTooltip"
title="<?php echo JHtml::_('tooltipText',
'COM_CONTENT_NUM_ITEMS_TIP'); ?>">
							<?php echo $child->getNumItems(true); ?>
						</span>
					<?php endif; ?>

					<?php if (count($child->getChildren()) > 0 &&
$this->maxLevel > 1) : ?>
						<a href="#category-<?php echo $child->id; ?>"
data-toggle="collapse" data-toggle="button"
class="btn btn-mini pull-right" aria-label="<?php echo
JText::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
					<?php endif; ?>
				</h3>
				<?php endif; ?>

				<?php if ($this->params->get('show_subcat_desc') ==
1) : ?>
					<?php if ($child->description) : ?>
						<div class="category-desc">
							<?php echo JHtml::_('content.prepare',
$child->description, '', 'com_content.category');
?>
						</div>
					<?php endif; ?>
				<?php endif; ?>

				<?php if (count($child->getChildren()) > 0 &&
$this->maxLevel > 1) : ?>
					<div class="collapse fade" id="category-<?php
echo $child->id; ?>">
						<?php
							$this->children[$child->id] = $child->getChildren();
						$this->category = $child;
						$this->maxLevel--;
						echo $this->loadTemplate('children');
						$this->category = $child->getParent();
						$this->maxLevel++;
						?>
					</div>
				<?php endif; ?>
			</div>
			<?php endif; ?>
		<?php endif; ?>
	<?php endforeach; ?>

<?php endif; ?>
PK	��[k����views/category/view.feed.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class ContentViewCategory extends JViewCategoryfeed
{
	/**
	 * @var    string  The name of the view to link individual items to
	 * @since  3.2
	 */
	protected $viewName = 'article';

	/**
	 * Method to reconcile non standard names from components to usage in this
class.
	 * Typically overridden in the component feed view class.
	 *
	 * @param   object  $item  The item for a feed, an element of the $items
array.
	 *
	 * @return  void
	 *
	 * @since   3.2
	 */
	protected function reconcileNames($item)
	{
		// Get description, intro_image, author and date
		$app               = JFactory::getApplication();
		$params            = $app->getParams();
		$item->description = '';
		$obj = json_decode($item->images);
		$introImage = isset($obj->{'image_intro'}) ?
$obj->{'image_intro'} : '';

		if (isset($introImage) && ($introImage != ''))
		{
			$image = preg_match('/http/', $introImage) ? $introImage :
JURI::root() . $introImage;
			$item->description = '<p><img src="' . $image
. '" /></p>';
		}

		$item->description .= ($params->get('feed_summary', 0) ?
$item->introtext . $item->fulltext : $item->introtext);

		// Add readmore link to description if introtext is shown, show_readmore
is true and fulltext exists
		if (!$item->params->get('feed_summary', 0) &&
$item->params->get('feed_show_readmore', 0) &&
$item->fulltext)
		{
			// Compute the article slug
			$item->slug = $item->alias ? ($item->id . ':' .
$item->alias) : $item->id;

			// URL link to article
			$link = JRoute::_(
				ContentHelperRoute::getArticleRoute($item->slug, $item->catid,
$item->language),
				true,
				$app->get('force_ssl') == 2 ? \JRoute::TLS_FORCE :
\JRoute::TLS_IGNORE,
				true
			);

			$item->description .= '<p
class="feed-readmore"><a target="_blank"
href="' . $link . '">' .
JText::_('COM_CONTENT_FEED_READMORE') .
'</a></p>';
		}

		$item->author = $item->created_by_alias ?: $item->author;
	}
}
PK	��[ܟ>���views/category/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Registry\Registry;

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class ContentViewCategory extends JViewCategory
{
	/**
	 * @var    array  Array of leading items for blog display
	 * @since  3.2
	 */
	protected $lead_items = array();

	/**
	 * @var    array  Array of intro (multicolumn display) items for blog
display
	 * @since  3.2
	 */
	protected $intro_items = array();

	/**
	 * @var    array  Array of links in blog display
	 * @since  3.2
	 */
	protected $link_items = array();

	/**
	 * @var         integer  Number of columns in a multi column display
	 * @since       3.2
	 * @deprecated  4.0
	 */
	protected $columns = 1;

	/**
	 * @var    string  The name of the extension for the category
	 * @since  3.2
	 */
	protected $extension = 'com_content';

	/**
	 * @var    string  Default title to use for page title
	 * @since  3.2
	 */
	protected $defaultPageTitle = 'JGLOBAL_ARTICLES';

	/**
	 * @var    string  The name of the view to link individual items to
	 * @since  3.2
	 */
	protected $viewName = 'article';

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		parent::commonCategoryDisplay();

		// Flag indicates to not add limitstart=0 to URL
		$this->pagination->hideEmptyLimitstart = true;

		// Prepare the data
		// Get the metrics for the structural page layout.
		$params     = $this->params;
		$numLeading = $params->def('num_leading_articles', 1);
		$numIntro   = $params->def('num_intro_articles', 4);
		$numLinks   = $params->def('num_links', 4);
		$this->vote = PluginHelper::isEnabled('content',
'vote');

		PluginHelper::importPlugin('content');
		$dispatcher = JEventDispatcher::getInstance();

		// Compute the article slugs and prepare introtext (runs content
plugins).
		foreach ($this->items as $item)
		{
			$item->slug = $item->alias ? ($item->id . ':' .
$item->alias) : $item->id;

			$item->parent_slug = $item->parent_alias ? ($item->parent_id .
':' . $item->parent_alias) : $item->parent_id;

			// No link for ROOT category
			if ($item->parent_alias === 'root')
			{
				$item->parent_slug = null;
			}

			$item->catslug = $item->category_alias ? ($item->catid .
':' . $item->category_alias) : $item->catid;
			$item->event   = new stdClass;

			// Old plugins: Ensure that text property is available
			if (!isset($item->text))
			{
				$item->text = $item->introtext;
			}

			$dispatcher->trigger('onContentPrepare', array
('com_content.category', &$item, &$item->params, 0));

			// Old plugins: Use processed text as introtext
			$item->introtext = $item->text;

			$results = $dispatcher->trigger('onContentAfterTitle',
array('com_content.category', &$item, &$item->params,
0));
			$item->event->afterDisplayTitle = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentBeforeDisplay',
array('com_content.category', &$item, &$item->params,
0));
			$item->event->beforeDisplayContent = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentAfterDisplay',
array('com_content.category', &$item, &$item->params,
0));
			$item->event->afterDisplayContent = trim(implode("\n",
$results));
		}

		// For blog layouts, preprocess the breakdown of leading, intro and
linked articles.
		// This makes it much easier for the designer to just interrogate the
arrays.
		if ($params->get('layout_type') === 'blog' ||
$this->getLayout() === 'blog')
		{
			foreach ($this->items as $i => $item)
			{
				if ($i < $numLeading)
				{
					$this->lead_items[] = $item;
				}

				elseif ($i >= $numLeading && $i < $numLeading +
$numIntro)
				{
					$this->intro_items[] = $item;
				}

				elseif ($i < $numLeading + $numIntro + $numLinks)
				{
					$this->link_items[] = $item;
				}
				else
				{
					continue;
				}
			}

			$this->columns = max(1, $params->def('num_columns', 1));

			$order = $params->def('multi_column_order', 1);

			if ($order == 0 && $this->columns > 1)
			{
				// Call order down helper
				$this->intro_items =
ContentHelperQuery::orderDownColumns($this->intro_items,
$this->columns);
			}
		}

		// Because the application sets a default page title,
		// we need to get it from the menu item itself
		$app    = Factory::getApplication();
		$active = $app->getMenu()->getActive();

		if ($active
			&& $active->component == 'com_content'
			&& isset($active->query['view'],
$active->query['id'])
			&& $active->query['view'] == 'category'
			&& $active->query['id'] ==
$this->category->id)
		{
			$this->params->def('page_heading',
$this->params->get('page_title', $active->title));
			$title = $this->params->get('page_title',
$active->title);
		}
		else
		{
			$this->params->def('page_heading',
$this->category->title);
			$title = $this->category->title;
			$this->params->set('page_title', $title);
		}

		// Check for empty title and add site name if param is set
		if (empty($title))
		{
			$title = $app->get('sitename');
		}
		elseif ($app->get('sitename_pagetitles', 0) == 1)
		{
			$title = JText::sprintf('JPAGETITLE',
$app->get('sitename'), $title);
		}
		elseif ($app->get('sitename_pagetitles', 0) == 2)
		{
			$title = JText::sprintf('JPAGETITLE', $title,
$app->get('sitename'));
		}

		if (empty($title))
		{
			$title = $this->category->title;
		}

		$this->document->setTitle($title);

		if ($this->category->metadesc)
		{
			$this->document->setDescription($this->category->metadesc);
		}
		elseif ($this->params->get('menu-meta_description'))
		{
			$this->document->setDescription($this->params->get('menu-meta_description'));
		}

		if ($this->category->metakey)
		{
			$this->document->setMetadata('keywords',
$this->category->metakey);
		}
		elseif ($this->params->get('menu-meta_keywords'))
		{
			$this->document->setMetadata('keywords',
$this->params->get('menu-meta_keywords'));
		}

		if ($this->params->get('robots'))
		{
			$this->document->setMetadata('robots',
$this->params->get('robots'));
		}

		if (!is_object($this->category->metadata))
		{
			$this->category->metadata = new
Registry($this->category->metadata);
		}

		if (($app->get('MetaAuthor') == '1') &&
$this->category->get('author', ''))
		{
			$this->document->setMetaData('author',
$this->category->get('author', ''));
		}

		$mdata = $this->category->metadata->toArray();

		foreach ($mdata as $k => $v)
		{
			if ($v)
			{
				$this->document->setMetadata($k, $v);
			}
		}

		return parent::display($tpl);
	}

	/**
	 * Prepares the document
	 *
	 * @return  void
	 */
	protected function prepareDocument()
	{
		parent::prepareDocument();
		$menu = $this->menu;
		$id = (int) @$menu->query['id'];

		if ($menu && (!isset($menu->query['option']) ||
$menu->query['option'] !== 'com_content' ||
$menu->query['view'] === 'article'
			|| $id != $this->category->id))
		{
			$path = array(array('title' =>
$this->category->title, 'link' => ''));
			$category = $this->category->getParent();

			while ((!isset($menu->query['option']) ||
$menu->query['option'] !== 'com_content' ||
$menu->query['view'] === 'article'
				|| $id != $category->id) && $category->id > 1)
			{
				$path[] = array('title' => $category->title,
'link' =>
ContentHelperRoute::getCategoryRoute($category->id));
				$category = $category->getParent();
			}

			$path = array_reverse($path);

			foreach ($path as $item)
			{
				$this->pathway->addItem($item['title'],
$item['link']);
			}
		}

		parent::addFeed();
	}
}
PK	��[�����views/featured/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

JHtml::_('behavior.caption');

// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
?>
<div class="blog-featured<?php echo $this->pageclass_sfx;
?>" itemscope itemtype="https://schema.org/Blog">
<?php if ($this->params->get('show_page_heading') != 0)
: ?>
<div class="page-header">
	<h1>
	<?php echo
$this->escape($this->params->get('page_heading')); ?>
	</h1>
</div>
<?php endif; ?>
<?php if ($this->params->get('page_subheading')) : ?>
	<h2> 
		<?php echo
$this->escape($this->params->get('page_subheading'));
?>
	</h2>
<?php endif; ?>
<?php $leadingcount = 0; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading clearfix">
	<?php foreach ($this->lead_items as &$item) : ?>
		<div class="leading-<?php echo $leadingcount; ?><?php
echo $item->state == 0 ? ' system-unpublished' : null; ?>
clearfix"
			itemprop="blogPost" itemscope
itemtype="https://schema.org/BlogPosting">
			<?php
				$this->item = &$item;
				echo $this->loadTemplate('item');
			?>
		</div>
		<?php
			$leadingcount++;
		?>
	<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
	$introcount = count($this->intro_items);
	$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>
	<?php foreach ($this->intro_items as $key => &$item) : ?>

		<?php
		$key = ($key - $leadingcount) + 1;
		$rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
		$row = $counter / $this->columns;

		if ($rowcount === 1) : ?>

		<div class="items-row cols-<?php echo (int) $this->columns;
?> <?php echo 'row-' . $row; ?> row-fluid">
		<?php endif; ?>
			<div class="item column-<?php echo $rowcount; ?><?php
echo $item->state == 0 ? ' system-unpublished' : null; ?>
span<?php echo round(12 / $this->columns); ?>"
				itemprop="blogPost" itemscope
itemtype="https://schema.org/BlogPosting">
			<?php
					$this->item = &$item;
					echo $this->loadTemplate('item');
			?>
			</div>
			<?php $counter++; ?>

			<?php if (($rowcount == $this->columns) or ($counter ==
$introcount)) : ?>

		</div>
		<?php endif; ?>

	<?php endforeach; ?>
<?php endif; ?>

<?php if (!empty($this->link_items)) : ?>
	<div class="items-more">
	<?php echo $this->loadTemplate('links'); ?>
	</div>
<?php endif; ?>

<?php if ($this->params->def('show_pagination', 2) == 1 
|| ($this->params->get('show_pagination') == 2 &&
$this->pagination->pagesTotal > 1)) : ?>
	<div class="pagination">

		<?php if
($this->params->def('show_pagination_results', 1)) : ?>
			<p class="counter pull-right">
				<?php echo $this->pagination->getPagesCounter(); ?>
			</p>
		<?php endif; ?>
				<?php echo $this->pagination->getPagesLinks(); ?>
	</div>
<?php endif; ?>

</div>
PK	��[��F�D8D8views/featured/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_FEATURED_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_FEATURED"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_FEATURED_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="advanced"
label="COM_MENUS_LAYOUT_FEATURED_OPTIONS">
			<field
				name="featured_categories"
				type="category"
				label="COM_CONTENT_FEATURED_CATEGORIES_LABEL"
				description="COM_CONTENT_FEATURED_CATEGORIES_DESC"
				extension="com_content"
				multiple="true"
				size="10"
				default=""
		 		>
				<option value="">JOPTION_ALL_CATEGORIES</option>
			</field>

			<field 
				name="layout_type"
				type="hidden"
				default="blog"
			/>

			<field 
				name="bloglayout" 
				type="spacer" 
				label="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL"
				class="text"
			/>

			<field 
				name="num_leading_articles" 
				type="number"
				label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
				description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
				useglobal="true"
				size="3"
			/>

			<field 
				name="num_intro_articles" 
				type="number"
				label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
				description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
				useglobal="true"
				size="3"
			/>

			<field 
				name="num_columns" 
				type="number"
				label="JGLOBAL_NUM_COLUMNS_LABEL"
				description="JGLOBAL_NUM_COLUMNS_DESC"
				useglobal="true"
				size="3"
			/>

			<field 
				name="num_links" 
				type="number"
				label="JGLOBAL_NUM_LINKS_LABEL"
				description="JGLOBAL_NUM_LINKS_DESC"
				useglobal="true"
				size="3"
			/>

			<field 
				name="multi_column_order" 
				type="list"
				label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
				description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
				useglobal="true"
				>
				<option value="0">JGLOBAL_Down</option>
				<option value="1">JGLOBAL_Across</option>
			</field>

			<field 
				name="orderby_pri" 
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				description="JGLOBAL_CATEGORY_ORDER_DESC"
				useglobal="true"
				>
				<option value="none">JGLOBAL_No_Order</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field 
				name="orderby_sec" 
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				description="JGLOBAL_ARTICLE_ORDER_DESC"
				useglobal="true"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits">JGLOBAL_LEAST_HITS</option>
				<option
value="random">JGLOBAL_RANDOM_ORDER</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field 
				name="order_date" 
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				description="JGLOBAL_ORDERING_DATE_DESC"
				useglobal="true"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field 
				name="show_pagination" 
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				description="JGLOBAL_PAGINATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field 
				name="show_pagination_results" 
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				description="JGLOBAL_PAGINATION_RESULTS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="page_subheading"
				type="text"
				label="JGLOBAL_SUBHEADING_LABEL"
				description="JGLOBAL_SUBHEADING_DESC"
				size="20"
			/>

	</fieldset>

	<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
			<field 
				name="show_title" 
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				description="JGLOBAL_SHOW_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_titles" 
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_intro" 
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				description="JGLOBAL_SHOW_INTRO_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"
				default=""
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field 
				name="show_category" 
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_category" 
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				description="JGLOBAL_LINK_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_parent_category" 
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_parent_category" 
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_associations"
				type="list"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				description="JGLOBAL_SHOW_ASSOCIATIONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field 
				name="show_author" 
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				description="JGLOBAL_SHOW_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="link_author" 
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				description="JGLOBAL_LINK_AUTHOR_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field 
				name="show_create_date" 
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				description="JGLOBAL_SHOW_CREATE_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_modify_date" 
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_publish_date" 
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_item_navigation" 
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				description="JGLOBAL_SHOW_NAVIGATION_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote" 
				type="list"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				description="JGLOBAL_SHOW_VOTE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_icons" 
				type="list"
				label="JGLOBAL_SHOW_ICONS_LABEL"
				description="JGLOBAL_SHOW_ICONS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_print_icon" 
				type="list"
				label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
				description="JGLOBAL_SHOW_PRINT_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_email_icon" 
				type="list"
				label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
				description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_hits" 
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				description="JGLOBAL_SHOW_HITS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_tags"
				type="list"
				label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
				description="COM_CONTENT_FIELD_SHOW_TAGS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="show_noauth" 
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>

		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
			<field 
				name="show_feed_link" 
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				description="JGLOBAL_SHOW_FEED_LINK_DESC"
				useglobal="true"
				class="chzn-color"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field 
				name="feed_summary" 
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				description="JGLOBAL_FEED_SUMMARY_DESC"
				useglobal="true"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK	��[�s�c==$views/featured/tmpl/default_item.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

// Create a shortcut for params.
$params  = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info    =
$this->item->params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the
parameter.
$assocParam = (JLanguageAssociations::isEnabled() &&
$params->get('show_associations'));

$currentDate       = JFactory::getDate()->format('Y-m-d
H:i:s');
$isExpired         = $this->item->publish_down < $currentDate
&& $this->item->publish_down !==
JFactory::getDbo()->getNullDate();
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isUnpublished     = $this->item->state == 0 || $isNotPublishedYet ||
$isExpired;

?>
<?php if ($isUnpublished) : ?>
	<div class="system-unpublished">
<?php endif; ?>

<?php if ($params->get('show_title')) : ?>
	<h2 class="item-title" itemprop="headline">
	<?php if ($params->get('link_titles') &&
$params->get('access-view')) : ?>
		<a href="<?php echo
JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)); ?>"
itemprop="url">
			<?php echo $this->escape($this->item->title); ?>
		</a>
	<?php else : ?>
		<?php echo $this->escape($this->item->title); ?>
	<?php endif; ?>
	</h2>
<?php endif; ?>

<?php if ($this->item->state == 0) : ?>
	<span class="label label-warning"><?php echo
JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($isNotPublishedYet) : ?>
	<span class="label label-warning"><?php echo
JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($isExpired) : ?>
	<span class="label label-warning"><?php echo
JText::_('JEXPIRED'); ?></span>
<?php endif; ?>

<?php if ($canEdit || $params->get('show_print_icon') ||
$params->get('show_email_icon')) : ?>
	<?php echo JLayoutHelper::render('joomla.content.icons',
array('params' => $params, 'item' =>
$this->item, 'print' => false)); ?>
<?php endif; ?>

<?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>

<?php // Todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
	|| $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam); ?>

<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
	<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
	<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'above')); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags',
1) && !empty($this->item->tags->itemTags)) : ?>
	<?php echo JLayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
<?php endif; ?>

<?php echo JLayoutHelper::render('joomla.content.intro_image',
$this->item); ?>

<?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>

<?php echo $this->item->introtext; ?>

<?php if ($info == 1 || $info == 2) : ?>
	<?php if ($useDefList) : ?>
		<?php // Todo: for Joomla4 joomla.content.info_block.block can be
changed to joomla.content.info_block ?>
		<?php echo
JLayoutHelper::render('joomla.content.info_block.block',
array('item' => $this->item, 'params' =>
$params, 'position' => 'below')); ?>
	<?php endif; ?>
	<?php if ($params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
		<?php echo JLayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
	<?php endif; ?>
<?php endif; ?>

<?php if ($params->get('show_readmore') &&
$this->item->readmore) :
	if ($params->get('access-view')) :
		$link =
JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language));
	else :
		$menu = JFactory::getApplication()->getMenu();
		$active = $menu->getActive();
		$itemId = $active->id;
		$link = new
JUri(JRoute::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
		$link->setVar('return',
base64_encode(ContentHelperRoute::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)));
	endif; ?>

	<?php echo JLayoutHelper::render('joomla.content.readmore',
array('item' => $this->item, 'params' =>
$params, 'link' => $link)); ?>

<?php endif; ?>

<?php if ($isUnpublished) : ?>
	</div>
<?php endif; ?>

<?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
PK	��[��+((%views/featured/tmpl/default_links.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;
?>
<ol class="nav nav-tabs nav-stacked">
<?php foreach ($this->link_items as &$item) : ?>
	<li>
		<a href="<?php echo
JRoute::_(ContentHelperRoute::getArticleRoute($item->slug,
$item->catid, $item->language)); ?>">
			<?php echo $item->title; ?></a>
	</li>
<?php endforeach; ?>
</ol>
PK	��[��f�
�
views/featured/view.feed.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Frontpage View class
 *
 * @since  1.5
 */
class ContentViewFeatured extends JViewLegacy
{
	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		// Parameters
		$app       = JFactory::getApplication();
		$doc       = JFactory::getDocument();
		$params    = $app->getParams();
		$feedEmail = $app->get('feed_email', 'none');
		$siteEmail = $app->get('mailfrom');
		$doc->link =
JRoute::_('index.php?option=com_content&view=featured');

		// Get some data from the model
		$app->input->set('limit',
$app->get('feed_limit'));
		$categories = JCategories::getInstance('Content');
		$rows       = $this->get('Items');

		foreach ($rows as $row)
		{
			// Strip html from feed item title
			$title = $this->escape($row->title);
			$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');

			// Compute the article slug
			$row->slug = $row->alias ? ($row->id . ':' .
$row->alias) : $row->id;

			// URL link to article
			$link = ContentHelperRoute::getArticleRoute($row->slug,
$row->catid, $row->language);

			$description = '';
			$obj = json_decode($row->images);
			$introImage = isset($obj->{'image_intro'}) ?
$obj->{'image_intro'} : '';

			if (isset($introImage) && ($introImage != ''))
			{
				$image = preg_match('/http/', $introImage) ? $introImage :
JURI::root() . $introImage;
				$description = '<p><img src="' . $image .
'" /></p>';
			}

			$description .= ($params->get('feed_summary', 0) ?
$row->introtext . $row->fulltext : $row->introtext);
			$author      = $row->created_by_alias ?: $row->author;

			// Load individual item creator class
			$item           = new JFeedItem;
			$item->title    = $title;
			$item->link     = \JRoute::_($link);
			$item->date     = $row->publish_up;
			$item->category = array();

			// All featured articles are categorized as "Featured"
			$item->category[] = JText::_('JFEATURED');

			for ($item_category = $categories->get($row->catid);
$item_category !== null; $item_category = $item_category->getParent())
			{
				// Only add non-root categories
				if ($item_category->id > 1)
				{
					$item->category[] = $item_category->title;
				}
			}

			$item->author = $author;

			if ($feedEmail === 'site')
			{
				$item->authorEmail = $siteEmail;
			}
			elseif ($feedEmail === 'author')
			{
				$item->authorEmail = $row->author_email;
			}

			// Add readmore link to description if introtext is shown, show_readmore
is true and fulltext exists
			if (!$params->get('feed_summary', 0) &&
$params->get('feed_show_readmore', 0) &&
$row->fulltext)
			{
				$link = \JRoute::_($link, true, $app->get('force_ssl') ==
2 ? \JRoute::TLS_FORCE : \JRoute::TLS_IGNORE, true);
				$description .= '<p class="feed-readmore"><a
target="_blank" href="' . $link .
'">' . JText::_('COM_CONTENT_FEED_READMORE') .
'</a></p>';
			}

			// Load item description and add div
			$item->description = '<div
class="feed-description">' . $description .
'</div>';

			// Loads item info into rss array
			$doc->addItem($item);
		}
	}
}
PK	��[v����views/featured/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Frontpage View class
 *
 * @since  1.5
 */
class ContentViewFeatured extends JViewLegacy
{
	protected $state = null;

	protected $item = null;

	protected $items = null;

	protected $pagination = null;

	protected $lead_items = array();

	protected $intro_items = array();

	protected $link_items = array();

	/** @deprecated  4.0 */
	protected $columns = 1;

	/**
	 * An instance of JDatabaseDriver.
	 *
	 * @var    JDatabaseDriver
	 * @since  3.6.3
	 */
	protected $db;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$user = JFactory::getUser();

		$state      = $this->get('State');
		$items      = $this->get('Items');
		$pagination = $this->get('Pagination');

		// Flag indicates to not add limitstart=0 to URL
		$pagination->hideEmptyLimitstart = true;

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseWarning(500, implode("\n", $errors));

			return false;
		}

		$params = &$state->params;

		// PREPARE THE DATA

		// Get the metrics for the structural page layout.
		$numLeading = (int) $params->def('num_leading_articles', 1);
		$numIntro   = (int) $params->def('num_intro_articles', 4);

		JPluginHelper::importPlugin('content');

		// Compute the article slugs and prepare introtext (runs content
plugins).
		foreach ($items as &$item)
		{
			$item->slug        = $item->alias ? ($item->id . ':'
. $item->alias) : $item->id;
			$item->catslug     = $item->category_alias ? ($item->catid .
':' . $item->category_alias) : $item->catid;
			$item->parent_slug = $item->parent_alias ? ($item->parent_id .
':' . $item->parent_alias) : $item->parent_id;

			// No link for ROOT category
			if ($item->parent_alias === 'root')
			{
				$item->parent_slug = null;
			}

			$item->event = new stdClass;
			$dispatcher  = JEventDispatcher::getInstance();

			// Old plugins: Ensure that text property is available
			if (!isset($item->text))
			{
				$item->text = $item->introtext;
			}

			$dispatcher->trigger('onContentPrepare', array
('com_content.featured', &$item, &$item->params, 0));

			// Old plugins: Use processed text as introtext
			$item->introtext = $item->text;

			$results = $dispatcher->trigger('onContentAfterTitle',
array('com_content.featured', &$item, &$item->params,
0));
			$item->event->afterDisplayTitle = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentBeforeDisplay',
array('com_content.featured', &$item, &$item->params,
0));
			$item->event->beforeDisplayContent = trim(implode("\n",
$results));

			$results = $dispatcher->trigger('onContentAfterDisplay',
array('com_content.featured', &$item, &$item->params,
0));
			$item->event->afterDisplayContent = trim(implode("\n",
$results));
		}

		// Preprocess the breakdown of leading, intro and linked articles.
		// This makes it much easier for the designer to just interogate the
arrays.
		$max = count($items);

		// The first group is the leading articles.
		$limit = $numLeading;

		for ($i = 0; $i < $limit && $i < $max; $i++)
		{
			$this->lead_items[$i] = &$items[$i];
		}

		// The second group is the intro articles.
		$limit = $numLeading + $numIntro;

		// Order articles across, then down (or single column mode)
		for ($i = $numLeading; $i < $limit && $i < $max; $i++)
		{
			$this->intro_items[$i] = &$items[$i];
		}

		$this->columns = max(1, $params->def('num_columns', 1));
		$order = $params->def('multi_column_order', 1);

		if ($order == 0 && $this->columns > 1)
		{
			// Call order down helper
			$this->intro_items =
ContentHelperQuery::orderDownColumns($this->intro_items,
$this->columns);
		}

		// The remainder are the links.
		for ($i = $numLeading + $numIntro; $i < $max; $i++)
		{
			$this->link_items[$i] = &$items[$i];
		}

		// Escape strings for HTML output
		$this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx'));

		$this->params     = &$params;
		$this->items      = &$items;
		$this->pagination = &$pagination;
		$this->user       = &$user;
		$this->db         = JFactory::getDbo();

		$this->_prepareDocument();

		parent::display($tpl);
	}

	/**
	 * Prepares the document.
	 *
	 * @return  void
	 */
	protected function _prepareDocument()
	{
		$app   = JFactory::getApplication();
		$menus = $app->getMenu();
		$title = null;

		// Because the application sets a default page title,
		// we need to get it from the menu item itself
		$menu = $menus->getActive();

		if ($menu)
		{
			$this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
		}
		else
		{
			$this->params->def('page_heading',
JText::_('JGLOBAL_ARTICLES'));
		}

		$title = $this->params->get('page_title', '');

		if (empty($title))
		{
			$title = $app->get('sitename');
		}
		elseif ($app->get('sitename_pagetitles', 0) == 1)
		{
			$title = JText::sprintf('JPAGETITLE',
$app->get('sitename'), $title);
		}
		elseif ($app->get('sitename_pagetitles', 0) == 2)
		{
			$title = JText::sprintf('JPAGETITLE', $title,
$app->get('sitename'));
		}

		$this->document->setTitle($title);

		if ($this->params->get('menu-meta_description'))
		{
			$this->document->setDescription($this->params->get('menu-meta_description'));
		}

		if ($this->params->get('menu-meta_keywords'))
		{
			$this->document->setMetadata('keywords',
$this->params->get('menu-meta_keywords'));
		}

		if ($this->params->get('robots'))
		{
			$this->document->setMetadata('robots',
$this->params->get('robots'));
		}

		// Add feed links
		if ($this->params->get('show_feed_link', 1))
		{
			$link    = '&format=feed&limitstart=';
			$attribs = array('type' => 'application/rss+xml',
'title' => 'RSS 2.0');
			$this->document->addHeadLink(JRoute::_($link .
'&type=rss'), 'alternate', 'rel',
$attribs);
			$attribs = array('type' =>
'application/atom+xml', 'title' => 'Atom
1.0');
			$this->document->addHeadLink(JRoute::_($link .
'&type=atom'), 'alternate', 'rel',
$attribs);
		}
	}
}
PK	��[ʳm..views/form/tmpl/edit.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.tabstate');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0));
JHtml::_('formbehavior.chosen', '#jform_tags', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');
$this->tab_name = 'com-content-form';
$this->ignore_fieldsets = array('image-intro',
'image-full', 'jmetadata',
'item_associations');

// Create shortcut to parameters.
$params = $this->state->get('params');

// This checks if the editor config options have ever been saved. If they
haven't they will fall back to the original settings.
$editoroptions = isset($params->show_publishing_options);

if (!$editoroptions)
{
	$params->show_urls_images_frontend = '0';
}

JFactory::getDocument()->addScriptDeclaration("
	Joomla.submitbutton = function(task)
	{
		if (task == 'article.cancel' ||
document.formvalidator.isValid(document.getElementById('adminForm')))
		{
			" . $this->form->getField('articletext')->save()
. "
			Joomla.submitform(task);
		}
	}
");
?>
<div class="edit item-page<?php echo $this->pageclass_sfx;
?>">
	<?php if ($params->get('show_page_heading')) : ?>
	<div class="page-header">
		<h1>
			<?php echo
$this->escape($params->get('page_heading')); ?>
		</h1>
	</div>
	<?php endif; ?>

	<form action="<?php echo
JRoute::_('index.php?option=com_content&a_id=' . (int)
$this->item->id); ?>" method="post"
name="adminForm" id="adminForm"
class="form-validate form-vertical">
		<fieldset>
			<?php echo JHtml::_('bootstrap.startTabSet',
$this->tab_name, array('active' => 'editor'));
?>

			<?php echo JHtml::_('bootstrap.addTab', $this->tab_name,
'editor', JText::_('COM_CONTENT_ARTICLE_CONTENT'));
?>
				<?php echo $this->form->renderField('title'); ?>

				<?php if (is_null($this->item->id)) : ?>
					<?php echo $this->form->renderField('alias'); ?>
				<?php endif; ?>

				<?php echo $this->form->getInput('articletext');
?>

				<?php if ($this->captchaEnabled) : ?>
					<?php echo $this->form->renderField('captcha');
?>
				<?php endif; ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php if ($params->get('show_urls_images_frontend')) :
?>
			<?php echo JHtml::_('bootstrap.addTab', $this->tab_name,
'images', JText::_('COM_CONTENT_IMAGES_AND_URLS'));
?>
				<?php echo $this->form->renderField('image_intro',
'images'); ?>
				<?php echo
$this->form->renderField('image_intro_alt',
'images'); ?>
				<?php echo
$this->form->renderField('image_intro_caption',
'images'); ?>
				<?php echo $this->form->renderField('float_intro',
'images'); ?>
				<?php echo
$this->form->renderField('image_fulltext',
'images'); ?>
				<?php echo
$this->form->renderField('image_fulltext_alt',
'images'); ?>
				<?php echo
$this->form->renderField('image_fulltext_caption',
'images'); ?>
				<?php echo
$this->form->renderField('float_fulltext',
'images'); ?>
				<?php echo $this->form->renderField('urla',
'urls'); ?>
				<?php echo $this->form->renderField('urlatext',
'urls'); ?>
				<div class="control-group">
					<div class="controls">
						<?php echo $this->form->getInput('targeta',
'urls'); ?>
					</div>
				</div>
				<?php echo $this->form->renderField('urlb',
'urls'); ?>
				<?php echo $this->form->renderField('urlbtext',
'urls'); ?>
				<div class="control-group">
					<div class="controls">
						<?php echo $this->form->getInput('targetb',
'urls'); ?>
					</div>
				</div>
				<?php echo $this->form->renderField('urlc',
'urls'); ?>
				<?php echo $this->form->renderField('urlctext',
'urls'); ?>
				<div class="control-group">
					<div class="controls">
						<?php echo $this->form->getInput('targetc',
'urls'); ?>
					</div>
				</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php endif; ?>

			<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

			<?php echo JHtml::_('bootstrap.addTab', $this->tab_name,
'publishing', JText::_('COM_CONTENT_PUBLISHING'));
?>
				<?php echo $this->form->renderField('catid'); ?>
				<?php echo $this->form->renderField('tags'); ?>
				<?php echo $this->form->renderField('note'); ?>
				<?php if ($params->get('save_history', 0)) : ?>
					<?php echo
$this->form->renderField('version_note'); ?>
				<?php endif; ?>
				<?php if ($params->get('show_publishing_options', 1) ==
1) : ?>
					<?php echo
$this->form->renderField('created_by_alias'); ?>
				<?php endif; ?>
				<?php if
($this->item->params->get('access-change')) : ?>
					<?php echo $this->form->renderField('state'); ?>
					<?php echo $this->form->renderField('featured');
?>
					<?php if ($params->get('show_publishing_options', 1)
== 1) : ?>
						<?php echo $this->form->renderField('publish_up');
?>
						<?php echo
$this->form->renderField('publish_down'); ?>
					<?php endif; ?>
				<?php endif; ?>
				<?php echo $this->form->renderField('access'); ?>
				<?php if (is_null($this->item->id)) : ?>
					<div class="control-group">
						<div class="control-label">
						</div>
						<div class="controls">
							<?php echo JText::_('COM_CONTENT_ORDERING'); ?>
						</div>
					</div>
				<?php endif; ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php echo JHtml::_('bootstrap.addTab', $this->tab_name,
'language', JText::_('JFIELD_LANGUAGE_LABEL')); ?>
				<?php echo $this->form->renderField('language');
?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>

			<?php if ($params->get('show_publishing_options', 1) ==
1) : ?>
				<?php echo JHtml::_('bootstrap.addTab',
$this->tab_name, 'metadata',
JText::_('COM_CONTENT_METADATA')); ?>
					<?php echo $this->form->renderField('metadesc');
?>
					<?php echo $this->form->renderField('metakey');
?>
				<?php echo JHtml::_('bootstrap.endTab'); ?>
			<?php endif; ?>

			<?php echo JHtml::_('bootstrap.endTabSet'); ?>

			<input type="hidden" name="task"
value="" />
			<input type="hidden" name="return"
value="<?php echo $this->return_page; ?>" />
			<?php echo JHtml::_('form.token'); ?>
		</fieldset>
		<div class="btn-toolbar">
			<div class="btn-group">
				<button type="button" class="btn btn-primary"
onclick="Joomla.submitbutton('article.save')">
					<span class="icon-ok"></span><?php echo
JText::_('JSAVE') ?>
				</button>
			</div>
			<div class="btn-group">
				<button type="button" class="btn"
onclick="Joomla.submitbutton('article.cancel')">
					<span class="icon-cancel"></span><?php echo
JText::_('JCANCEL') ?>
				</button>
			</div>
			<?php if ($params->get('save_history', 0) &&
$this->item->id) : ?>
			<div class="btn-group">
				<?php echo $this->form->getInput('contenthistory');
?>
			</div>
			<?php endif; ?>
		</div>
	</form>
</div>
PK	��[��%�views/form/tmpl/edit.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_FORM_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_FORM_VIEW_DEFAULT_OPTION">
		<help
			key = "JHELP_MENUS_MENU_ITEM_ARTICLE_CREATE"
		/>
		<message>
			<![CDATA[COM_CONTENT_FORM_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
	<fields name="params">
		<fieldset name="basic"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field 
				name="enable_category"
				type="radio"
				label="COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_CATEGORY_DESC"
				class="btn-group btn-group-yesno"
				default="0"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="catid"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				description="JGLOBAL_CHOOSE_CATEGORY_DESC"
				extension="com_content"
				select="true"
				new="true"
				edit="true"
				clear="true"
				showon="enable_category:1"
			/>

			<field
				name="redirect_menuitem"
				type="modal_menu"
				label="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_DESC"
				>
				<option value="">JDEFAULT</option>
			</field>

			<field
				name="custom_cancel_redirect"
				type="radio"
				label="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_DESC"
				class="btn-group btn-group-yesno"
				default="0"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="cancel_redirect_menuitem"
				type="modal_menu"
				label="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC"
				showon="custom_cancel_redirect:1"
				>
				<option value="">JDEFAULT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK	��[Dv�^GGviews/form/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML Article View class for the Content component
 *
 * @since  1.5
 */
class ContentViewForm extends JViewLegacy
{
	protected $form;

	protected $item;

	protected $return_page;

	protected $state;

	/**
	 * Should we show a captcha form for the submission of the article?
	 *
	 * @var   bool
	 * @since 3.7.0
	 */
	protected $captchaEnabled = false;

	/**
	 * Execute and display a template script.
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		$user = JFactory::getUser();
		$app  = JFactory::getApplication();

		// Get model data.
		$this->state       = $this->get('State');
		$this->item        = $this->get('Item');
		$this->form        = $this->get('Form');
		$this->return_page = $this->get('ReturnPage');

		if (empty($this->item->id))
		{
			$catid = $this->state->params->get('catid');

			if ($this->state->params->get('enable_category') == 1
&& $catid)
			{
				$authorised = $user->authorise('core.create',
'com_content.category.' . $catid);
			}
			else
			{
				$authorised = $user->authorise('core.create',
'com_content') ||
count($user->getAuthorisedCategories('com_content',
'core.create'));
			}
		}
		else
		{
			$authorised =
$this->item->params->get('access-edit');
		}

		if ($authorised !== true)
		{
			$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
			$app->setHeader('status', 403, true);

			return false;
		}

		$this->item->tags = new JHelperTags;

		if (!empty($this->item->id))
		{
			$this->item->tags->getItemTags('com_content.article',
$this->item->id);

			$this->item->images = json_decode($this->item->images);
			$this->item->urls = json_decode($this->item->urls);

			$tmp = new stdClass;
			$tmp->images = $this->item->images;
			$tmp->urls = $this->item->urls;
			$this->form->bind($tmp);
		}

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseWarning(500, implode("\n", $errors));

			return false;
		}

		// Create a shortcut to the parameters.
		$params = &$this->state->params;

		// Escape strings for HTML output
		$this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx'));

		$this->params = $params;

		// Override global params with article specific params
		$this->params->merge($this->item->params);
		$this->user   = $user;

		// Propose current language as default when creating new article
		if (empty($this->item->id) &&
JLanguageMultilang::isEnabled())
		{
			$lang = JFactory::getLanguage()->getTag();
			$this->form->setFieldAttribute('language',
'default', $lang);
		}

		$captchaSet = $params->get('captcha',
JFactory::getApplication()->get('captcha', '0'));

		foreach (JPluginHelper::getPlugin('captcha') as $plugin)
		{
			if ($captchaSet === $plugin->name)
			{
				$this->captchaEnabled = true;
				break;
			}
		}

		$this->_prepareDocument();
		parent::display($tpl);
	}

	/**
	 * Prepares the document
	 *
	 * @return  void
	 */
	protected function _prepareDocument()
	{
		$app   = JFactory::getApplication();
		$menus = $app->getMenu();
		$title = null;

		// Because the application sets a default page title,
		// we need to get it from the menu item itself
		$menu = $menus->getActive();

		if ($menu)
		{
			$this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
		}
		else
		{
			$this->params->def('page_heading',
JText::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
		}

		$title = $this->params->def('page_title',
JText::_('COM_CONTENT_FORM_EDIT_ARTICLE'));

		if ($app->get('sitename_pagetitles', 0) == 1)
		{
			$title = JText::sprintf('JPAGETITLE',
$app->get('sitename'), $title);
		}
		elseif ($app->get('sitename_pagetitles', 0) == 2)
		{
			$title = JText::sprintf('JPAGETITLE', $title,
$app->get('sitename'));
		}

		$this->document->setTitle($title);

		$pathway = $app->getPathWay();
		$pathway->addItem($title, '');

		if ($this->params->get('menu-meta_description'))
		{
			$this->document->setDescription($this->params->get('menu-meta_description'));
		}

		if ($this->params->get('menu-meta_keywords'))
		{
			$this->document->setMetadata('keywords',
$this->params->get('menu-meta_keywords'));
		}

		if ($this->params->get('robots'))
		{
			$this->document->setMetadata('robots',
$this->params->get('robots'));
		}
	}
}
PK��[�Ӓppforms/article.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<form>
	<fieldset
addfieldprefix="Joomla\Component\Categories\Administrator\Field">
		<field
			name="id"
			type="hidden"
			label="COM_CONTENT_ID_LABEL"
			size="10"
			default="0"
			readonly="true"
		/>

		<field
			name="contenthistory"
			type="contenthistory"
			label="JTOOLBAR_VERSIONS"
			data-typeAlias="com_content.article"
		/>

		<field
			name="asset_id"
			type="hidden"
			filter="unset"
		/>

		<field
			name="title"
			type="text"
			label="JGLOBAL_TITLE"
			size="30"
			required="true"
		/>

		<field
			name="alias"
			type="text"
			label="JFIELD_ALIAS_LABEL"
			description="JFIELD_ALIAS_DESC"
			hint="JFIELD_ALIAS_PLACEHOLDER"
			size="45"
		/>

		<field
			name="articletext"
			type="editor"
			label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL"
			hiddenLabel="true"
			buttons="true"
			filter="\Joomla\CMS\Component\ComponentHelper::filterText"
			asset_id="com_content"
		/>

		<field
			name="state"
			type="list"
			label="JSTATUS"
			class="form-select-color-state"
			size="1"
			default="1"
			validate="options"
			>
			<option value="1">JPUBLISHED</option>
			<option value="0">JUNPUBLISHED</option>
			<option value="2">JARCHIVED</option>
			<option value="-2">JTRASHED</option>
		</field>

		<field
			name="featured"
			type="list"
			label="JGLOBAL_FIELD_FEATURED_LABEL"
			default="0"
			validate="options"
			>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>

		<field
			name="featured_up"
			type="calendar"
			label="COM_CONTENT_FIELD_FEATURED_UP_LABEL"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
			showon="featured:1"
		/>

		<field
			name="featured_down"
			type="calendar"
			label="COM_CONTENT_FIELD_FEATURED_DOWN_LABEL"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
			showon="featured:1"
		/>

		<field
			name="catid"
			type="categoryedit"
			label="JCATEGORY"
			extension="com_content"
			required="true"
		/>

		<field
			name="created"
			type="calendar"
			translateformat="true"
			filter="unset"
		/>

		<field
			name="created_by"
			type="text"
			filter="unset"
		/>

		<field
			name="created_by_alias"
			type="text"
			label="JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL"
			size="20"
		/>

		<field
			name="note"
			type="text"
			label="COM_CONTENT_FIELD_NOTE_LABEL"
			size="40"
			maxlength="255"
		/>

		<field
			name="version_note"
			type="text"
			label="JGLOBAL_FIELD_VERSION_NOTE_LABEL"
			maxlength="255"
			size="45"
		/>

		<field
			name="publish_up"
			type="calendar"
			label="JGLOBAL_FIELD_PUBLISH_UP_LABEL"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
		/>

		<field
			name="publish_down"
			type="calendar"
			label="JGLOBAL_FIELD_PUBLISH_DOWN_LABEL"
			translateformat="true"
			showtime="true"
			size="22"
			filter="user_utc"
		/>

		<field
			name="language"
			type="contentlanguage"
			label="JFIELD_LANGUAGE_LABEL"
			>
			<option value="*">JALL</option>
		</field>

		<field
			name="tags"
			type="tag"
			label="JTAG"
			multiple="true"
			size="45"
		/>

		<field
			name="metakey"
			type="textarea"
			label="JFIELD_META_KEYWORDS_LABEL"
			rows="5"
			cols="50"
		/>

		<field
			name="metadesc"
			type="textarea"
			label="JFIELD_META_DESCRIPTION_LABEL"
			rows="3"
			cols="30"
			maxlength="300"
			charcounter="true"
		/>

		<field
			name="access"
			type="accesslevel"
			label="JFIELD_ACCESS_LABEL"
			filter="UINT"
			validate="options"
		/>

		<field
			name="captcha"
			type="captcha"
			label="COM_CONTENT_CAPTCHA_LABEL"
			validate="captcha"
			namespace="article"
		/>
	</fieldset>
		<fields name="images">
		<fieldset name="image-intro">
			<field
				name="image_intro"
				type="media"
				schemes="http,https,ftp,ftps,data,file"
				validate="url"
				relative="true"
				label="COM_CONTENT_FIELD_INTRO_LABEL"
			/>

			<field
				name="image_intro_alt"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
				size="20"
			/>

			<field
				name="image_intro_alt_empty"
				type="checkbox"
				label="COM_CONTENT_FIELD_IMAGE_ALT_EMPTY_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_ALT_EMPTY_DESC"
			/>

			<field
				name="image_intro_caption"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
				size="20"
			/>

			<field
				name="float_intro"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CLASS_LABEL"
				size="20"
				useglobal="true"
				validate="CssIdentifier"
			/>
		</fieldset>
		<fieldset name="image-full">
			<field
				name="image_fulltext"
				type="media"
				schemes="http,https,ftp,ftps,data,file"
				validate="url"
				relative="true"
				label="COM_CONTENT_FIELD_FULL_LABEL"
			/>

			<field
				name="image_fulltext_alt"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
				size="20"
			/>

			<field
				name="image_fulltext_alt_empty"
				type="checkbox"
				label="COM_CONTENT_FIELD_IMAGE_ALT_EMPTY_LABEL"
				description="COM_CONTENT_FIELD_IMAGE_ALT_EMPTY_DESC"
			/>

			<field
				name="image_fulltext_caption"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
				size="20"
			/>

			<field
				name="float_fulltext"
				type="text"
				label="COM_CONTENT_FIELD_IMAGE_CLASS_LABEL"
				size="20"
				useglobal="true"
				validate="CssIdentifier"
			/>
		</fieldset>
	</fields>
	<fields name="urls">
		<field
			name="urla"
			type="url"
			label="COM_CONTENT_FIELD_URLA_LABEL"
			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlatext"
			type="text"
			label="COM_CONTENT_FIELD_URLA_LINK_TEXT_LABEL"
			size="20"
		/>

		<field
			name="targeta"
			type="hidden"
		/>

		<field
			name="urlb"
			type="url"
			label="COM_CONTENT_FIELD_URLB_LABEL"
			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlbtext"
			type="text"
			label="COM_CONTENT_FIELD_URLB_LINK_TEXT_LABEL"
			size="20"
		/>

		<field
			name="targetb"
			type="hidden"
		/>

		<field
			name="urlc"
			type="url"
			label="COM_CONTENT_FIELD_URLC_LABEL"
			validate="url"
			filter="url"
			relative="true"
		/>

		<field
			name="urlctext"
			type="text"
			label="COM_CONTENT_FIELD_URLC_LINK_TEXT_LABEL"
			size="20"
		/>

		<field
			name="targetc"
			type="hidden"
		/>
	</fields>
	<fields name="metadata">
		<fieldset
			name="jmetadata"
			label="JGLOBAL_FIELDSET_METADATA_OPTIONS">

				<field
					name="robots"
					type="hidden"
					label="JFIELD_METADATA_ROBOTS_LABEL"
					filter="unset"
					>
					<option value="">JGLOBAL_USE_GLOBAL</option>
					<option value="index, follow"></option>
					<option value="noindex, follow"></option>
					<option value="index, nofollow"></option>
					<option value="noindex, nofollow"></option>
				</field>

				<field
					name="author"
					type="hidden"
					label="JAUTHOR"
					filter="unset"
					size="20"
				/>

				<field
					name="rights"
					type="hidden"
					label="JFIELD_META_RIGHTS_LABEL"
					filter="unset"
				/>

		</fieldset>
	</fields>
</form>
PK��[����forms/filter_articles.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<form>
	<fields name="filter">
		<field
			name="search"
			type="text"
			inputmode="search"
			label="COM_CONTENT_MODAL_FILTER_SEARCH_LABEL"
			description="COM_CONTENT_MODAL_FILTER_SEARCH_DESC"
			hint="JSEARCH_FILTER"
		/>

		<field
			name="published"
			type="status"
			label="JSTATUS"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_PUBLISHED</option>
		</field>

		<field
			name="category_id"
			type="category"
			label="JCATEGORY"
			multiple="true"
			extension="com_content"
			layout="joomla.form.field.list-fancy-select"
			hint="JOPTION_SELECT_CATEGORY"
			onchange="this.form.submit();"
			published="0,1,2"
		/>

		<field
			name="access"
			type="accesslevel"
			label="JGRID_HEADING_ACCESS"
			multiple="true"
			layout="joomla.form.field.list-fancy-select"
			hint="JOPTION_SELECT_ACCESS"
			onchange="this.form.submit();"
		/>

		<field
			name="author_id"
			type="author"
			label="JAUTHOR"
			multiple="true"
			layout="joomla.form.field.list-fancy-select"
			hint="JOPTION_SELECT_AUTHOR"
			onchange="this.form.submit();"
			>
			<option value="0">JNONE</option>
		</field>

		<field
			name="level"
			type="integer"
			label="JGLOBAL_MAXLEVEL_LABEL"
			first="1"
			last="10"
			step="1"
			languages="*"
			onchange="this.form.submit();"
			>
			<option
value="">JOPTION_SELECT_MAX_LEVELS</option>
		</field>

		<field
			name="language"
			type="contentlanguage"
			label="JGRID_HEADING_LANGUAGE"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_LANGUAGE</option>
			<option value="*">JALL</option>
		</field>

		<field
			name="tag"
			type="tag"
			label="JTAG"
			multiple="true"
			mode="nested"
			custom="false"
			hint="JOPTION_SELECT_TAG"
			onchange="this.form.submit();"
		/>

	</fields>
	<fields name="list">
		<field
			name="fullordering"
			type="list"
			label="JGLOBAL_SORT_BY"
			onchange="this.form.submit();"
			default="a.title ASC"
			validate="options"
			>
			<option value="">JGLOBAL_SORT_BY</option>
			<option value="a.ordering
ASC">JGRID_HEADING_ORDERING_ASC</option>
			<option value="a.ordering
DESC">JGRID_HEADING_ORDERING_DESC</option>
			<option value="a.state ASC">JSTATUS_ASC</option>
			<option value="a.state DESC">JSTATUS_DESC</option>
			<option value="a.title
ASC">JGLOBAL_TITLE_ASC</option>
			<option value="a.title
DESC">JGLOBAL_TITLE_DESC</option>
			<option value="category_title
ASC">JCATEGORY_ASC</option>
			<option value="category_title
DESC">JCATEGORY_DESC</option>
			<option value="association ASC"
requires="associations">JASSOCIATIONS_ASC</option>
			<option value="association DESC"
requires="associations">JASSOCIATIONS_DESC</option>
			<option value="a.access
ASC">JGRID_HEADING_ACCESS_ASC</option>
			<option value="a.access
DESC">JGRID_HEADING_ACCESS_DESC</option>
			<option value="a.created_by
ASC">JAUTHOR_ASC</option>
			<option value="a.created_by
DESC">JAUTHOR_DESC</option>
			<option value="language ASC"
requires="multilanguage">JGRID_HEADING_LANGUAGE_ASC</option>
			<option value="language DESC"
requires="multilanguage">JGRID_HEADING_LANGUAGE_DESC</option>
			<option value="a.created ASC">JDATE_ASC</option>
			<option value="a.created DESC">JDATE_DESC</option>
			<option value="a.id
ASC">JGRID_HEADING_ID_ASC</option>
			<option value="a.id
DESC">JGRID_HEADING_ID_DESC</option>
			<option value="a.featured
ASC">JFEATURED_ASC</option>
			<option value="a.featured
DESC">JFEATURED_DESC</option>
			<option value="a.hits
ASC">JGLOBAL_HITS_ASC</option>
			<option value="a.hits
DESC">JGLOBAL_HITS_DESC</option>
		</field>

		<field
			name="limit"
			type="limitbox"
			label="JGLOBAL_LIST_LIMIT"
			default="25"
			onchange="this.form.submit();"
		/>
	</fields>
</form>
PK��[�e��vvtmpl/article/default.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLE_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_ARTICLE_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_Single_Article"
		/>
		<message>
			<![CDATA[COM_CONTENT_ARTICLE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
>

			<field
				name="id"
				type="modal_article"
				label="COM_CONTENT_FIELD_SELECT_ARTICLE_LABEL"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">

		<!-- Basic options. -->
		<fieldset name="basic"
			label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>

			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				useglobal="true"
				validate="options"
				>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option	value="1">JSHOW</option>
				<option	value="0">JHIDE</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="show_associations"
				type="assoc"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_vote"
				type="votelist"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_tags"
				type="list"
				label="JGLOBAL_SHOW_TAGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="urls_position"
				type="list"
				label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
				useglobal="true"
				filter="integer"
				validate="options"
				>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option value="-1">JHIDE</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[�R(���tmpl/article/default_links.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2011 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;

// Create shortcut
$urls = json_decode($this->item->urls);

// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) ||
!empty($urls->urlc))) :
    ?>
<div class="com-content-article__links content-links">
    <ul class="com-content-article__links content-list">
        <?php
            $urlarray = [
            [$urls->urla, $urls->urlatext, $urls->targeta,
'a'],
            [$urls->urlb, $urls->urlbtext, $urls->targetb,
'b'],
            [$urls->urlc, $urls->urlctext, $urls->targetc,
'c']
            ];
            foreach ($urlarray as $url) :
                $link = $url[0];
                $label = $url[1];
                $target = $url[2];
                $id = $url[3];

                if (! $link) :
                    continue;
                endif;

                // If no label is present, take the link
                $label = $label ?: $link;

                // If no target is present, use the default
                $target = $target ?: $params->get('target' .
$id);
                ?>
            <li class="com-content-article__link
content-links-<?php echo $id; ?>">
                <?php
                    // Compute the correct link

                switch ($target) {
                    case 1:
                        // Open in a new window
                        echo '<a href="' .
htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '"
target="_blank" rel="nofollow noopener
noreferrer">' .
                            htmlspecialchars($label, ENT_COMPAT,
'UTF-8') . '</a>';
                        break;

                    case 2:
                        // Open in a popup window
                        $attribs =
'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
                        echo "<a href=\"" .
htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\"
onclick=\"window.open(this.href, 'targetWindow',
'" . $attribs . "'); return false;\"
rel=\"noopener noreferrer\">" .
                            htmlspecialchars($label, ENT_COMPAT,
'UTF-8') . '</a>';
                        break;
                    case 3:
                        echo '<a href="' .
htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '"
rel="noopener noreferrer" data-bs-toggle="modal"
data-bs-target="#linkModal">' .
                            htmlspecialchars($label, ENT_COMPAT,
'UTF-8') . ' </a>';
                        echo HTMLHelper::_(
                            'bootstrap.renderModal',
                            'linkModal',
                            [
                                'url'    => $link,
                                'title'  => $label,
                                'height' => '100%',
                                'width'  => '100%',
                                'modalWidth'  =>
'500',
                                'bodyHeight'  =>
'500',
                                'footer' => '<button
type="button" class="btn btn-secondary"
data-bs-dismiss="modal" aria-hidden="true">'
                                    .
\Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
                            ]
                        );
                        break;

                    default:
                        // Open in parent window
                        echo '<a href="' .
htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '"
rel="nofollow">' .
                            htmlspecialchars($label, ENT_COMPAT,
'UTF-8') . ' </a>';
                        break;
                }
                ?>
                </li>
            <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>
PK��[��;;tmpl/article/default.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// Create shortcuts to some parameters.
$params  = $this->item->params;
$canEdit = $params->get('access-edit');
$user    = $this->getCurrentUser();
$info    = $params->get('info_block_position', 0);
$htag    = $this->params->get('show_page_heading') ?
'h2' : 'h1';

// Check if associations are implemented. If they are, define the
parameter.
$assocParam        = (Associations::isEnabled() &&
$params->get('show_associations'));
$currentDate       = Factory::getDate()->format('Y-m-d
H:i:s');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired         = !is_null($this->item->publish_down) &&
$this->item->publish_down < $currentDate;
?>
<div class="com-content-article item-page<?php echo
$this->pageclass_sfx; ?>">
    <meta itemprop="inLanguage" content="<?php echo
($this->item->language === '*') ?
Factory::getApplication()->get('language') :
$this->item->language; ?>">
    <?php if ($this->params->get('show_page_heading')) :
?>
    <div class="page-header">
        <h1> <?php echo
$this->escape($this->params->get('page_heading')); ?>
</h1>
    </div>
    <?php endif;
    if (!empty($this->item->pagination) &&
!$this->item->paginationposition &&
$this->item->paginationrelative) {
        echo $this->item->pagination;
    }
    ?>

    <?php $useDefList = $params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
    || $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam; ?>

    <?php if ($params->get('show_title')) : ?>
    <div class="page-header">
        <<?php echo $htag; ?>>
            <?php echo $this->escape($this->item->title); ?>
        </<?php echo $htag; ?>>
        <?php if ($this->item->state ==
ContentComponent::CONDITION_UNPUBLISHED) : ?>
            <span class="badge bg-warning
text-light"><?php echo Text::_('JUNPUBLISHED');
?></span>
        <?php endif; ?>
        <?php if ($isNotPublishedYet) : ?>
            <span class="badge bg-warning
text-light"><?php echo Text::_('JNOTPUBLISHEDYET');
?></span>
        <?php endif; ?>
        <?php if ($isExpired) : ?>
            <span class="badge bg-warning
text-light"><?php echo Text::_('JEXPIRED');
?></span>
        <?php endif; ?>
    </div>
    <?php endif; ?>
    <?php if ($canEdit) : ?>
        <?php echo
LayoutHelper::render('joomla.content.icons', ['params'
=> $params, 'item' => $this->item]); ?>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
    <?php echo $this->item->event->afterDisplayTitle; ?>

    <?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
        <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'above']); ?>
    <?php endif; ?>

    <?php if ($info == 0 &&
$params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
        <?php $this->item->tagLayout = new
FileLayout('joomla.content.tags'); ?>

        <?php echo
$this->item->tagLayout->render($this->item->tags->itemTags);
?>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
    <?php echo $this->item->event->beforeDisplayContent; ?>

    <?php if ((int) $params->get('urls_position', 0) === 0)
: ?>
        <?php echo $this->loadTemplate('links'); ?>
    <?php endif; ?>
    <?php if ($params->get('access-view')) : ?>
        <?php echo
LayoutHelper::render('joomla.content.full_image',
$this->item); ?>
        <?php
        if (!empty($this->item->pagination) &&
!$this->item->paginationposition &&
!$this->item->paginationrelative) :
            echo $this->item->pagination;
        endif;
        ?>
        <?php if (isset($this->item->toc)) :
            echo $this->item->toc;
        endif; ?>
    <div class="com-content-article__body">
        <?php echo $this->item->text; ?>
    </div>

        <?php if ($info == 1 || $info == 2) : ?>
            <?php if ($useDefList) : ?>
                <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'below']); ?>
            <?php endif; ?>
            <?php if ($params->get('show_tags', 1)
&& !empty($this->item->tags->itemTags)) : ?>
                <?php $this->item->tagLayout = new
FileLayout('joomla.content.tags'); ?>
                <?php echo
$this->item->tagLayout->render($this->item->tags->itemTags);
?>
            <?php endif; ?>
        <?php endif; ?>

        <?php
        if (!empty($this->item->pagination) &&
$this->item->paginationposition &&
!$this->item->paginationrelative) :
            echo $this->item->pagination;
            ?>
        <?php endif; ?>
        <?php if ((int) $params->get('urls_position', 0)
=== 1) : ?>
            <?php echo $this->loadTemplate('links'); ?>
        <?php endif; ?>
        <?php // Optional teaser intro text for guests ?>
    <?php elseif ($params->get('show_noauth') == true
&& $user->get('guest')) : ?>
        <?php echo
LayoutHelper::render('joomla.content.intro_image',
$this->item); ?>
        <?php echo HTMLHelper::_('content.prepare',
$this->item->introtext); ?>
        <?php // Optional link to let them register to see the whole
article. ?>
        <?php if ($params->get('show_readmore') &&
$this->item->fulltext != null) : ?>
            <?php $menu = Factory::getApplication()->getMenu(); ?>
            <?php $active = $menu->getActive(); ?>
            <?php $itemId = $active->id; ?>
            <?php $link = new
Uri(Route::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false)); ?>
            <?php $link->setVar('return',
base64_encode(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language))); ?>
            <?php echo
LayoutHelper::render('joomla.content.readmore', ['item'
=> $this->item, 'params' => $params, 'link'
=> $link]); ?>
        <?php endif; ?>
    <?php endif; ?>
    <?php
    if (!empty($this->item->pagination) &&
$this->item->paginationposition &&
$this->item->paginationrelative) :
        echo $this->item->pagination;
        ?>
    <?php endif; ?>
    <?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
    <?php echo $this->item->event->afterDisplayContent; ?>
</div>
PK��[F)S*C*Ctmpl/categories/default.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_CATEGORIES_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_List_All_Categories"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORIES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
		>
			<field
				name="id"
				type="category"
				label="JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL"
				extension="com_content"
				show_root="true"
				required="true"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="basic"
label="JGLOBAL_CATEGORIES_OPTIONS">

			<field
				name="show_base_description"
				type="list"
				label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="categories_description"
				type="textarea"
				label="JGLOBAL_FIELD_CATEGORIES_DESC_LABEL"
				cols="25"
				rows="5"
			/>

			<field
				name="maxLevelcat"
				type="list"
				label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="-1">JALL</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field
				name="show_empty_categories_cat"
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_subcat_desc_cat"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_cat_num_articles_cat"
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
	</fieldset>

	<fieldset name="category"
label="JGLOBAL_CATEGORY_OPTIONS"
description="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL">

			<field
				name="show_category_title"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_TITLE"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_description"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_description_image"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="maxLevel"
				type="list"
				label="JGLOBAL_MAXLEVEL_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="-1">JALL</option>
				<option value="0">JNONE</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field
				name="show_empty_categories"
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_no_articles"
				type="list"
				label="COM_CONTENT_NO_ARTICLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_subcat_desc"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_cat_num_articles"
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
	</fieldset>
	<fieldset name="blog"
label="JGLOBAL_BLOG_LAYOUT_OPTIONS"
description="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL">

			<field
				name="blog_class_leading"
				type="text"
				label="JGLOBAL_BLOG_CLASS_LEADING"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="blog_class"
				type="text"
				label="JGLOBAL_BLOG_CLASS"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="num_leading_articles"
				type="number"
				label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
				filter="integer"
				useglobal="true"
			/>

			<field
				name="num_intro_articles"
				type="number"
				label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
				filter="integer"
				useglobal="true"
			/>

			<field
				name="num_links"
				type="number"
				label="JGLOBAL_NUM_LINKS_LABEL"
				filter="integer"
				useglobal="true"
			/>

			<field
				name="show_subcategory_content"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JNONE</option>
				<option value="-1">JALL</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field
				name="spacer5"
				type="spacer"
				hr="true"
			/>

			<field
				name="orderby_pri"
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field
				name="orderby_sec"
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				useglobal="true"
				validate="options"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits"
requires="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits"
requires="hits">JGLOBAL_LEAST_HITS</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field
				name="order_date"
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>
	</fieldset>

	<fieldset name="advanced"
label="JGLOBAL_LIST_LAYOUT_OPTIONS"
description="JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL">

			<field
				name="show_pagination_limit"
				type="list"
				label="JGLOBAL_DISPLAY_SELECT_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="filter_field"
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="hide">JHIDE</option>
				<option value="title">JGLOBAL_TITLE</option>
				<option value="author">JAUTHOR</option>
				<option value="hits"
requires="hits">JGLOBAL_HITS</option>
			</field>

			<field
				name="show_headings"
				type="list"
				label="JGLOBAL_SHOW_HEADINGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="list_show_date"
				type="list"
				label="JGLOBAL_SHOW_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field
				name="date_format"
				type="text"
				label="JGLOBAL_DATE_FORMAT_LABEL"
				useglobal="true"
			/>

			<field
				name="list_show_hits"
				type="list"
				label="JGLOBAL_LIST_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="list_show_author"
				type="list"
				label="JGLOBAL_LIST_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="display_num"
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				default=""
				useglobal="true"
				validate="options"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

	</fieldset>

		<fieldset name="shared"
label="COM_CONTENT_SHARED_LABEL"
description="COM_CONTENT_SHARED_DESC">

			<field
				name="show_pagination"
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field
				name="show_pagination_results"
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
		</fieldset>

		<fieldset name="article"
label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>

			<field
				name="article_layout"
				type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				class="form-select"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="votelist"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>
		<fieldset name="integration">

			<field
				name="show_feed_link"
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="feed_summary"
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[{��ee!tmpl/categories/default_items.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2010 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

if ($this->maxLevelcat != 0 &&
count($this->items[$this->parent->id]) > 0) :
    ?>
    <div class="com-content-categories__items">
        <?php foreach ($this->items[$this->parent->id] as $id
=> $item) : ?>
            <?php if
($this->params->get('show_empty_categories_cat') ||
$item->numitems || count($item->getChildren())) : ?>
            <div class="com-content-categories__item">
                <div
class="com-content-categories__item-title-wrapper">
                    <div
class="com-content-categories__item-title">
                        <a href="<?php echo
Route::_(RouteHelper::getCategoryRoute($item->id, $item->language));
?>">
                        <?php echo $this->escape($item->title);
?></a>
                        <?php if
($this->params->get('show_cat_num_articles_cat') == 1)
:?>
                            <span class="badge bg-info">
                                <?php echo
Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
                                <?php echo $item->numitems; ?>
                            </span>
                        <?php endif; ?>
                    </div>
                    <?php if (count($item->getChildren()) > 0
&& $this->maxLevelcat > 1) : ?>
                        <button
                            type="button"
                            id="category-btn-<?php echo
$item->id; ?>"
                            data-category-id="<?php echo
$item->id; ?>"
                            class="btn btn-secondary btn-sm"
                            aria-expanded="false"
                            aria-label="<?php echo
Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"
                        >
                            <span class="icon-plus"
aria-hidden="true"></span>
                        </button>
                    <?php endif; ?>
                </div>
                <?php if
($this->params->get('show_description_image') &&
$item->getParams()->get('image')) : ?>
                    <?php echo HTMLHelper::_('image',
$item->getParams()->get('image'),
$item->getParams()->get('image_alt')); ?>
                <?php endif; ?>
                <?php if
($this->params->get('show_subcat_desc_cat') == 1) : ?>
                    <?php if ($item->description) : ?>
                        <div
class="com-content-categories__description category-desc">
                            <?php echo
HTMLHelper::_('content.prepare', $item->description,
'', 'com_content.categories'); ?>
                        </div>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if (count($item->getChildren()) > 0
&& $this->maxLevelcat > 1) : ?>
                    <div
class="com-content-categories__children"
id="category-<?php echo $item->id; ?>"
hidden="">
                    <?php
                    $this->items[$item->id] =
$item->getChildren();
                    $this->parent = $item;
                    $this->maxLevelcat--;
                    echo $this->loadTemplate('items');
                    $this->parent = $item->getParent();
                    $this->maxLevelcat++;
                    ?>
                    </div>
                <?php endif; ?>
            </div>
            <?php endif; ?>
        <?php endforeach; ?>
    </div>
<?php endif; ?>
PK��[:��vvtmpl/categories/default.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

// Add strings for translations in Javascript.
Text::script('JGLOBAL_EXPAND_CATEGORIES');
Text::script('JGLOBAL_COLLAPSE_CATEGORIES');

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->getRegistry()->addExtensionRegistryFile('com_categories');
$wa->usePreset('com_categories.shared-categories-accordion');

?>
<div class="com-content-categories categories-list">
    <?php
        echo
LayoutHelper::render('joomla.content.categories_default', $this);
        echo $this->loadTemplate('items');
    ?>
</div>
PK��[����~~tmpl/archive/default.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_ARCHIVE_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_ARCHIVE_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_Article_Archived"
		/>
		<message>
			<![CDATA[COM_CONTENT_ARCHIVE_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request">
			<field
				name="catid"
				type="category"
				label="JCATEGORY"
				extension="com_content"
				multiple="true"
				layout="joomla.form.field.list-fancy-select"
				default=" "
				>
				<option value=" ">JOPTION_ALL_CATEGORIES</option>
			</field>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">

		<!-- Basic options. -->
		<fieldset name="basic"
label="JGLOBAL_ARCHIVE_OPTIONS"
		>

			<field
				name="orderby_sec"
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				default="alpha"
				validate="options"
				>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits"
requires="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits"
requires="hits">JGLOBAL_LEAST_HITS</option>
				<option
value="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field
				name="order_date"
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				default="created"
				validate="options"
				>
				<option value="created">JGLOBAL_Created</option>
				<option
value="modified">JGLOBAL_Modified</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field
				name="display_num"
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				default=""
				useglobal="true"
				validate="options"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

			<field
				name="filter_field"
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				default=""
				useglobal="true"
				validate="options"
				>
				<option value="hide">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="introtext_limit"
				type="number"
				label="JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL"
				filter="integer"
				default="100"
			/>

		</fieldset>

		<!-- Articles options. -->
		<fieldset name="articles"
			label="COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL"
		>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				default=""
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option	value="0">JNO</option>
				<option	value="1">JYES</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				description="JGLOBAL_LINKED_TITLES_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option	value="0">JNO</option>
				<option	value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
		</fieldset>

	</fields>
</metadata>
PK��[q�|�?3?3tmpl/archive/default_items.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

$params = $this->params;
?>
<div id="archive-items"
class="com-content-archive__items">
    <?php foreach ($this->items as $i => $item) : ?>
        <?php $info =
$item->params->get('info_block_position', 0); ?>
        <div class="row<?php echo $i % 2; ?>">
            <div class="page-header">
                <h2>
                    <?php if ($params->get('link_titles'))
: ?>
                        <a href="<?php echo
Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid,
$item->language)); ?>" >
                            <?php echo
$this->escape($item->title); ?>
                        </a>
                    <?php else : ?>
                        <?php echo $this->escape($item->title);
?>
                    <?php endif; ?>
                </h2>

                <?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
                <?php echo $item->event->afterDisplayTitle; ?>

                <?php if ($params->get('show_author')
&& !empty($item->author)) : ?>
                    <div class="createdby">
                    <?php $author = $item->created_by_alias ?:
$item->author; ?>
                    <?php $author = '<span>' . $author .
'</span>'; ?>
                        <?php if (!empty($item->contact_link)
&& $params->get('link_author') == true) : ?>
                            <?php echo
Text::sprintf('COM_CONTENT_WRITTEN_BY',
HTMLHelper::_('link', $this->item->contact_link, $author,
['itemprop' => 'url'])); ?>
                        <?php else : ?>
                            <?php echo
Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
                        <?php endif; ?>
                    </div>
                <?php endif; ?>
            </div>
        <?php $useDefList =
($params->get('show_modify_date') ||
$params->get('show_publish_date') ||
$params->get('show_create_date')
            || $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category')); ?>
        <?php if ($useDefList && ($info == 0 || $info == 2)) :
?>
            <div class="com-content-archive__info article-info
text-muted">
                <dl class="article-info">
                <dt class="article-info-term">
                    <?php echo
Text::_('COM_CONTENT_ARTICLE_INFO'); ?>
                </dt>

                <?php if
($params->get('show_parent_category') &&
!empty($item->parent_id)) : ?>
                    <dd>
                        <div class="parent-category-name">
                            <?php $title =
$this->escape($item->parent_title); ?>
                            <?php if
($params->get('link_parent_category') &&
!empty($item->parent_id)) : ?>
                                <?php $url = '<a
href="' . Route::_(
                                   
RouteHelper::getCategoryRoute($item->parent_id,
$item->parent_language)
                                )
                                    . '">' . $title .
'</a>'; ?>
                                <?php echo
Text::sprintf('COM_CONTENT_PARENT', $url); ?>
                            <?php else : ?>
                                <?php echo
Text::sprintf('COM_CONTENT_PARENT', '<span>' .
$title . '</span>'); ?>
                            <?php endif; ?>
                        </div>
                    </dd>
                <?php endif; ?>
                <?php if ($params->get('show_category')) :
?>
                    <dd>
                        <div class="category-name">
                            <?php $title =
$this->escape($item->category_title); ?>
                            <?php if
($params->get('link_category') && $item->catid) :
?>
                                <?php $url = '<a
href="' . Route::_(
                                   
RouteHelper::getCategoryRoute($item->catid, $item->category_language)
                                )
                                    . '">' . $title .
'</a>'; ?>
                                <?php echo
Text::sprintf('COM_CONTENT_CATEGORY', $url); ?>
                            <?php else : ?>
                                <?php echo
Text::sprintf('COM_CONTENT_CATEGORY', '<span>' .
$title . '</span>'); ?>
                            <?php endif; ?>
                        </div>
                    </dd>
                <?php endif; ?>

                <?php if
($params->get('show_publish_date')) : ?>
                    <dd>
                        <div class="published">
                            <span class="icon-calendar-alt"
aria-hidden="true"></span>
                            <time datetime="<?php echo
HTMLHelper::_('date', $item->publish_up, 'c');
?>">
                                <?php echo
Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON',
HTMLHelper::_('date', $item->publish_up,
Text::_('DATE_FORMAT_LC3'))); ?>
                            </time>
                        </div>
                    </dd>
                <?php endif; ?>

                <?php if ($info == 0) : ?>
                    <?php if
($params->get('show_modify_date')) : ?>
                        <dd>
                            <div class="modified">
                                <span
class="icon-calendar-alt"
aria-hidden="true"></span>
                                <time datetime="<?php echo
HTMLHelper::_('date', $item->modified, 'c');
?>">
                                    <?php echo
Text::sprintf('COM_CONTENT_LAST_UPDATED',
HTMLHelper::_('date', $item->modified,
Text::_('DATE_FORMAT_LC3'))); ?>
                                </time>
                            </div>
                        </dd>
                    <?php endif; ?>
                    <?php if
($params->get('show_create_date')) : ?>
                        <dd>
                            <div class="create">
                                <span
class="icon-calendar-alt"
aria-hidden="true"></span>
                                <time datetime="<?php echo
HTMLHelper::_('date', $item->created, 'c');
?>">
                                    <?php echo
Text::sprintf('COM_CONTENT_CREATED_DATE_ON',
HTMLHelper::_('date', $item->created,
Text::_('DATE_FORMAT_LC3'))); ?>
                                </time>
                            </div>
                        </dd>
                    <?php endif; ?>

                    <?php if ($params->get('show_hits')) :
?>
                        <dd>
                            <div class="hits">
                                <span
class="icon-eye"></span>
                                <meta
content="UserPageVisits:<?php echo $item->hits; ?>">
                                <?php echo
Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?>
                            </div>
                        </dd>
                    <?php endif; ?>
                <?php endif; ?>
                </dl>
            </div>
        <?php endif; ?>

        <?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
        <?php echo $item->event->beforeDisplayContent; ?>
        <?php if ($params->get('show_intro')) : ?>
            <div class="intro" > <?php echo
HTMLHelper::_('string.truncateComplex', $item->introtext,
$params->get('introtext_limit')); ?> </div>
        <?php endif; ?>

        <?php if ($useDefList && ($info == 1 || $info == 2)) :
?>
            <div class="article-info text-muted">
                <dl class="article-info">
                <dt class="article-info-term"><?php echo
Text::_('COM_CONTENT_ARTICLE_INFO'); ?></dt>

                <?php if ($info == 1) : ?>
                    <?php if
($params->get('show_parent_category') &&
!empty($item->parent_id)) : ?>
                        <dd>
                            <div
class="parent-category-name">
                                <?php $title =
$this->escape($item->parent_title); ?>
                                <?php if
($params->get('link_parent_category') &&
$item->parent_id) : ?>
                                    <?php $url = '<a
href="' . Route::_(
                                       
RouteHelper::getCategoryRoute($item->parent_id,
$item->parent_language)
                                    )
                                        . '">' . $title .
'</a>'; ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_PARENT', $url); ?>
                                <?php else : ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_PARENT', '<span>' .
$title . '</span>'); ?>
                                <?php endif; ?>
                            </div>
                        </dd>
                    <?php endif; ?>
                    <?php if
($params->get('show_category')) : ?>
                        <dd>
                            <div class="category-name">
                                <?php $title =
$this->escape($item->category_title); ?>
                                <?php if
($params->get('link_category') && $item->catid) :
?>
                                    <?php $url = '<a
href="' . Route::_(
                                       
RouteHelper::getCategoryRoute($item->catid, $item->category_language)
                                    )
                                        . '">' . $title .
'</a>'; ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_CATEGORY', $url); ?>
                                <?php else : ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_CATEGORY', '<span>' .
$title . '</span>'); ?>
                                <?php endif; ?>
                            </div>
                        </dd>
                    <?php endif; ?>
                    <?php if
($params->get('show_publish_date')) : ?>
                        <dd>
                            <div class="published">
                                <span
class="icon-calendar-alt"
aria-hidden="true"></span>
                                <time datetime="<?php echo
HTMLHelper::_('date', $item->publish_up, 'c');
?>">
                                    <?php echo
Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON',
HTMLHelper::_('date', $item->publish_up,
Text::_('DATE_FORMAT_LC3'))); ?>
                                </time>
                            </div>
                        </dd>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if ($params->get('show_create_date'))
: ?>
                    <dd>
                        <div class="create">
                            <span class="icon-calendar-alt"
aria-hidden="true"></span>
                            <time datetime="<?php echo
HTMLHelper::_('date', $item->created, 'c');
?>">
                                <?php echo
Text::sprintf('COM_CONTENT_CREATED_DATE_ON',
HTMLHelper::_('date', $item->modified,
Text::_('DATE_FORMAT_LC3'))); ?>
                            </time>
                        </div>
                    </dd>
                <?php endif; ?>
                <?php if ($params->get('show_modify_date'))
: ?>
                    <dd>
                        <div class="modified">
                            <span class="icon-calendar-alt"
aria-hidden="true"></span>
                            <time datetime="<?php echo
HTMLHelper::_('date', $item->modified, 'c');
?>">
                                <?php echo
Text::sprintf('COM_CONTENT_LAST_UPDATED',
HTMLHelper::_('date', $item->modified,
Text::_('DATE_FORMAT_LC3'))); ?>
                            </time>
                        </div>
                    </dd>
                <?php endif; ?>
                <?php if ($params->get('show_hits')) :
?>
                    <dd>
                        <div class="hits">
                            <span
class="icon-eye"></span>
                            <meta content="UserPageVisits:<?php
echo $item->hits; ?>">
                            <?php echo
Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?>
                        </div>
                    </dd>
                <?php endif; ?>
            </dl>
        </div>
        <?php endif; ?>
        <?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
        <?php echo $item->event->afterDisplayContent; ?>
    </div>
    <?php endforeach; ?>
</div>
<div class="com-content-archive__navigation w-100">
    <?php if
($this->params->def('show_pagination_results', 1)) : ?>
        <p class="com-content-archive__counter counter float-end
pt-3 pe-2">
            <?php echo $this->pagination->getPagesCounter(); ?>
        </p>
    <?php endif; ?>
    <div class="com-content-archive__pagination">
        <?php echo $this->pagination->getPagesLinks(); ?>
    </div>
</div>
PK��[�w��

tmpl/archive/default.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

?>
<div class="com-content-archive archive">
<?php if ($this->params->get('show_page_heading')) :
?>
    <div class="page-header">
        <h1>
            <?php echo
$this->escape($this->params->get('page_heading')); ?>
        </h1>
    </div>
<?php endif; ?>

<form id="adminForm" action="<?php echo
Route::_('index.php'); ?>" method="post"
class="com-content-archive__form">
    <fieldset class="com-content-archive__filters filters">
        <legend class="visually-hidden">
            <?php echo
Text::_('COM_CONTENT_FORM_FILTER_LEGEND'); ?>
        </legend>
        <div class="filter-search form-inline">
            <?php if ($this->params->get('filter_field')
!== 'hide') : ?>
            <div class="mb-2">
                <label class="filter-search-lbl
visually-hidden" for="filter-search"><?php echo
Text::_('COM_CONTENT_TITLE_FILTER_LABEL') .
'&#160;'; ?></label>
                <input type="text"
name="filter-search" id="filter-search"
value="<?php echo $this->escape($this->filter); ?>"
class="inputbox col-md-2"
onchange="document.getElementById('adminForm').submit();"
placeholder="<?php echo
Text::_('COM_CONTENT_TITLE_FILTER_LABEL'); ?>">
            </div>
            <?php endif; ?>

            <span class="me-2">
                <label class="visually-hidden"
for="month"><?php echo Text::_('JMONTH');
?></label>
                <?php echo $this->form->monthField; ?>
            </span>
            <span class="me-2">
                <label class="visually-hidden"
for="year"><?php echo Text::_('JYEAR');
?></label>
                <?php echo $this->form->yearField; ?>
            </span>
            <span class="me-2">
                <label class="visually-hidden"
for="limit"><?php echo
Text::_('JGLOBAL_DISPLAY_NUM'); ?></label>
                <?php echo $this->form->limitField; ?>
            </span>

            <button type="submit" class="btn
btn-primary" style="vertical-align: top;"><?php echo
Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
            <input type="hidden" name="view"
value="archive">
            <input type="hidden" name="option"
value="com_content">
            <input type="hidden" name="limitstart"
value="0">
        </div>
    </fieldset>
</form>
<?php echo $this->loadTemplate('items'); ?>
</div>
PK��[j��2!!tmpl/form/edit.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_FORM_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_FORM_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_Create_Article"
		/>
		<message>
			<![CDATA[COM_CONTENT_FORM_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
	<fields name="params">
		<fieldset name="basic"
			addfieldprefix="Joomla\Component\Categories\Administrator\Field"
		>
			<field
				name="enable_category"
				type="radio"
				label="COM_CONTENT_CREATE_ARTICLE_CATEGORY_LABEL"
				layout="joomla.form.field.radio.switcher"
				default="0"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="catid"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				extension="com_content"
				select="true"
				new="true"
				edit="true"
				clear="true"
				showon="enable_category:1"
			/>

			<field
				name="redirect_menuitem"
				type="modal_menu"
				label="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_REDIRECTMENU_DESC"
				>
				<option value="">JDEFAULT</option>
			</field>

			<field
				name="custom_cancel_redirect"
				type="radio"
				label="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_CUSTOM_CANCEL_REDIRECT_DESC"
				layout="joomla.form.field.radio.switcher"
				default="0"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="cancel_redirect_menuitem"
				type="modal_menu"
				label="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_LABEL"
				description="COM_CONTENT_CREATE_ARTICLE_CANCEL_REDIRECT_MENU_DESC"
				showon="custom_cancel_redirect:1"
				>
				<option value="">JDEFAULT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[�^�A#A#tmpl/form/edit.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
    ->useScript('form.validate')
    ->useScript('com_content.form-edit');

$this->tab_name = 'com-content-form';
$this->ignore_fieldsets = ['image-intro',
'image-full', 'jmetadata',
'item_associations'];
$this->useCoreUI = true;

// Create shortcut to parameters.
$params = $this->state->get('params');

// This checks if the editor config options have ever been saved. If they
haven't they will fall back to the original settings
if (!$params->exists('show_publishing_options')) {
    $params->set('show_urls_images_frontend', '0');
}
?>
<div class="edit item-page">
    <?php if ($params->get('show_page_heading')) : ?>
    <div class="page-header">
        <h1>
            <?php echo
$this->escape($params->get('page_heading')); ?>
        </h1>
    </div>
    <?php endif; ?>

    <form action="<?php echo
Route::_('index.php?option=com_content&a_id=' . (int)
$this->item->id); ?>" method="post"
name="adminForm" id="adminForm"
class="form-validate form-vertical">
        <fieldset>
            <?php echo HTMLHelper::_('uitab.startTabSet',
$this->tab_name, ['active' => 'editor',
'recall' => true, 'breakpoint' => 768]); ?>

            <?php echo HTMLHelper::_('uitab.addTab',
$this->tab_name, 'editor',
Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
                <?php echo
$this->form->renderField('title'); ?>

                <?php if (is_null($this->item->id)) : ?>
                    <?php echo
$this->form->renderField('alias'); ?>
                <?php endif; ?>

                <?php echo
$this->form->renderField('articletext'); ?>

                <?php if ($this->captchaEnabled) : ?>
                    <?php echo
$this->form->renderField('captcha'); ?>
                <?php endif; ?>
            <?php echo HTMLHelper::_('uitab.endTab'); ?>

            <?php if
($params->get('show_urls_images_frontend')) : ?>
                <?php echo HTMLHelper::_('uitab.addTab',
$this->tab_name, 'images',
Text::_('COM_CONTENT_IMAGES_AND_URLS')); ?>
                <?php echo
$this->form->renderField('image_intro',
'images'); ?>
                <?php echo
$this->form->renderField('image_intro_alt',
'images'); ?>
                <?php echo
$this->form->renderField('image_intro_alt_empty',
'images'); ?>
                <?php echo
$this->form->renderField('image_intro_caption',
'images'); ?>
                <?php echo
$this->form->renderField('float_intro',
'images'); ?>
                <?php echo
$this->form->renderField('image_fulltext',
'images'); ?>
                <?php echo
$this->form->renderField('image_fulltext_alt',
'images'); ?>
                <?php echo
$this->form->renderField('image_fulltext_alt_empty',
'images'); ?>
                <?php echo
$this->form->renderField('image_fulltext_caption',
'images'); ?>
                <?php echo
$this->form->renderField('float_fulltext',
'images'); ?>
                <?php echo
$this->form->renderField('urla', 'urls'); ?>
                <?php echo
$this->form->renderField('urlatext', 'urls');
?>
                <div class="control-group">
                    <div class="controls">
                        <?php echo
$this->form->getInput('targeta', 'urls'); ?>
                    </div>
                </div>
                <?php echo
$this->form->renderField('urlb', 'urls'); ?>
                <?php echo
$this->form->renderField('urlbtext', 'urls');
?>
                <div class="control-group">
                    <div class="controls">
                        <?php echo
$this->form->getInput('targetb', 'urls'); ?>
                    </div>
                </div>
                <?php echo
$this->form->renderField('urlc', 'urls'); ?>
                <?php echo
$this->form->renderField('urlctext', 'urls');
?>
                <div class="control-group">
                    <div class="controls">
                        <?php echo
$this->form->getInput('targetc', 'urls'); ?>
                    </div>
                </div>
                <?php echo HTMLHelper::_('uitab.endTab');
?>
            <?php endif; ?>

            <?php echo
LayoutHelper::render('joomla.edit.params', $this); ?>

            <?php echo HTMLHelper::_('uitab.addTab',
$this->tab_name, 'publishing',
Text::_('COM_CONTENT_PUBLISHING')); ?>

                <?php echo
$this->form->renderField('transition'); ?>
                <?php echo
$this->form->renderField('state'); ?>
                <?php echo
$this->form->renderField('catid'); ?>
                <?php echo
$this->form->renderField('tags'); ?>
                <?php echo
$this->form->renderField('note'); ?>
                <?php if ($params->get('save_history', 0))
: ?>
                    <?php echo
$this->form->renderField('version_note'); ?>
                <?php endif; ?>
                <?php if
($params->get('show_publishing_options', 1) == 1) : ?>
                    <?php echo
$this->form->renderField('created_by_alias'); ?>
                <?php endif; ?>
                <?php if
($this->item->params->get('access-change')) : ?>
                    <?php echo
$this->form->renderField('featured'); ?>
                    <?php if
($params->get('show_publishing_options', 1) == 1) : ?>
                        <?php echo
$this->form->renderField('featured_up'); ?>
                        <?php echo
$this->form->renderField('featured_down'); ?>
                        <?php echo
$this->form->renderField('publish_up'); ?>
                        <?php echo
$this->form->renderField('publish_down'); ?>
                    <?php endif; ?>
                <?php endif; ?>
                <?php echo
$this->form->renderField('access'); ?>
                <?php if (is_null($this->item->id)) : ?>
                    <div class="control-group">
                        <div class="control-label">
                        </div>
                        <div class="controls">
                            <?php echo
Text::_('COM_CONTENT_ORDERING'); ?>
                        </div>
                    </div>
                <?php endif; ?>
            <?php echo HTMLHelper::_('uitab.endTab'); ?>

            <?php if (Multilanguage::isEnabled()) : ?>
                <?php echo HTMLHelper::_('uitab.addTab',
$this->tab_name, 'language',
Text::_('JFIELD_LANGUAGE_LABEL')); ?>
                    <?php echo
$this->form->renderField('language'); ?>
                <?php echo HTMLHelper::_('uitab.endTab');
?>
            <?php else : ?>
                <?php echo
$this->form->renderField('language'); ?>
            <?php endif; ?>

            <?php if
($params->get('show_publishing_options', 1) == 1) : ?>
                <?php echo HTMLHelper::_('uitab.addTab',
$this->tab_name, 'metadata',
Text::_('COM_CONTENT_METADATA')); ?>
                    <?php echo
$this->form->renderField('metadesc'); ?>
                    <?php echo
$this->form->renderField('metakey'); ?>
                <?php echo HTMLHelper::_('uitab.endTab');
?>
            <?php endif; ?>

            <?php echo HTMLHelper::_('uitab.endTabSet'); ?>

            <input type="hidden" name="task"
value="">
            <input type="hidden" name="return"
value="<?php echo $this->return_page; ?>">
            <?php echo HTMLHelper::_('form.token'); ?>
        </fieldset>
        <div class="mb-2">
            <button type="button" class="btn
btn-primary" data-submit-task="article.apply">
                <span class="icon-check"
aria-hidden="true"></span>
                <?php echo Text::_('JSAVE'); ?>
            </button>
            <button type="button" class="btn
btn-primary" data-submit-task="article.save">
                <span class="icon-check"
aria-hidden="true"></span>
                <?php echo Text::_('JSAVEANDCLOSE'); ?>
            </button>
            <?php if ($this->showSaveAsCopy) : ?>
                <button type="button" class="btn
btn-primary" data-submit-task="article.save2copy">
                    <span class="icon-copy"
aria-hidden="true"></span>
                    <?php echo Text::_('JSAVEASCOPY'); ?>
                </button>
            <?php endif; ?>
            <button type="button" class="btn
btn-danger" data-submit-task="article.cancel">
                <span class="icon-times"
aria-hidden="true"></span>
                <?php echo Text::_('JCANCEL'); ?>
            </button>
            <?php if ($params->get('save_history', 0)
&& $this->item->id) : ?>
                <?php echo
$this->form->getInput('contenthistory'); ?>
            <?php endif; ?>
        </div>
    </form>
</div>
PK��[�ʑ)H)Htmpl/category/blog.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
		<help key = "Menu_Item:_Category_Blog" />
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_BLOG_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldprefix="Joomla\Component\Categories\Administrator\Field"
		>
			<field
				name="id"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				extension="com_content"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>

			<field
				name="filter_tag"
				type="tag"
				label="JTAG"
				multiple="true"
				mode="nested"
				custom="deny"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="basic"
label="JGLOBAL_CATEGORY_OPTIONS">
				<field
					name="layout_type"
					type="hidden"
					default="blog"
				/>

				<field
					name="show_category_title"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_TITLE"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_description"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_description_image"
					type="list"
					label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="maxLevel"
					type="list"
					label="JGLOBAL_MAXLEVEL_LABEL"
					description="JGLOBAL_MAXLEVEL_DESC"
					useglobal="true"
					validate="options"
					>
					<option value="-1">JALL</option>
					<option value="0">JNONE</option>
					<option value="1">J1</option>
					<option value="2">J2</option>
					<option value="3">J3</option>
					<option value="4">J4</option>
					<option value="5">J5</option>
				</field>

				<field
					name="show_empty_categories"
					type="list"
					label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_no_articles"
					type="list"
					label="COM_CONTENT_NO_ARTICLES_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_category_heading_title_text"
					type="list"
					label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_subcat_desc"
					type="list"
					label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_cat_num_articles"
					type="list"
					label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

				<field
					name="show_cat_tags"
					type="list"
					label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
					useglobal="true"
					class="form-select-color-state"
					validate="options"
					>
					<option value="0">JHIDE</option>
					<option value="1">JSHOW</option>
				</field>

		</fieldset>

		<fieldset name="advanced"
label="JGLOBAL_BLOG_LAYOUT_OPTIONS"
description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">

			<field
				name="num_leading_articles"
				type="number"
				label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
				filter="integer"
				validate="number"
				min="0"
				useglobal="true"
				parentclass="stack span-1"
			/>

			<field
				name="blog_class_leading"
				type="text"
				label="JGLOBAL_BLOG_CLASS_LEADING"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="num_intro_articles"
				type="number"
				label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
				filter="integer"
				validate="number"
				min="0"
				useglobal="true"
				parentclass="stack span-1"
			/>

			<field
				name="blog_class"
				type="text"
				label="JGLOBAL_BLOG_CLASS"
				description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="num_columns"
				type="number"
				label="JGLOBAL_NUM_COLUMNS_LABEL"
				filter="integer"
				validate="number"
				min="0"
				parentclass="stack span-1-inline"
				useglobal="true"
			/>

			<field
				name="multi_column_order"
				type="list"
				label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="options"
				>
				<option
value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
				<option
value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
			</field>

			<field
				name="num_links"
				type="number"
				label="JGLOBAL_NUM_LINKS_LABEL"
				filter="integer"
				validate="number"
				min="0"
				parentclass="stack span-1"
				useglobal="true"
			/>

			<field
				name="show_featured"
				type="list"
				label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
				default=""
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				parentclass="stack span-1"
				>
				<option value="show">JSHOW</option>
				<option value="hide">JHIDE</option>
				<option value="only">JONLY</option>
			</field>

			<field
				name="link_intro_image"
				type="list"
				label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-1-inline"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_subcategory_content"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-1-inline"
				>
				<option value="0">JNONE</option>
				<option value="-1">JALL</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>
			<field
				name="orderby_pri"
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field
				name="orderby_sec"
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits"
requires="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits"
requires="hits">JGLOBAL_LEAST_HITS</option>
				<option
value="random">JGLOBAL_RANDOM_ORDER</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field
				name="order_date"
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
				<option value="unpublished">JUNPUBLISHED</option>
			</field>

			<field
				name="show_pagination"
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				parentclass="stack span-1"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field
				name="show_pagination_results"
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				parentclass="stack span-1-inline"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

		</fieldset>

		<fieldset name="article"
			label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>

			<field
				name="article_layout"
				type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				class="form-select"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				default=""
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_associations"
				type="assoc"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="votelist"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_tags"
				type="list"
				label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>

		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
			<field
				name="show_feed_link"
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="feed_summary"
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[9���??tmpl/category/default.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_CATEGORY_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_CATEGORY_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_Category_List"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldprefix="Joomla\Component\Categories\Administrator\Field"
		>
			<field
				name="id"
				type="modal_category"
				label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
				extension="com_content"
				required="true"
				select="true"
				new="true"
				edit="true"
				clear="true"
			/>

			<field
				name="filter_tag"
				type="tag"
				label="JTAG"
				multiple="true"
				mode="nested"
				custom="deny"
			/>
		</fieldset>
	</fields>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="basic"
label="JGLOBAL_CATEGORY_OPTIONS">

			<field
				name="show_category_title"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_TITLE"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_description"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_description_image"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="maxLevel"
				type="list"
				label="JGLOBAL_MAXLEVEL_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="-1">JALL</option>
				<option value="0">JNONE</option>
				<option value="1">J1</option>
				<option value="2">J2</option>
				<option value="3">J3</option>
				<option value="4">J4</option>
				<option value="5">J5</option>
			</field>

			<field
				name="show_empty_categories"
				type="list"
				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_no_articles"
				type="list"
				label="COM_CONTENT_NO_ARTICLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_category_heading_title_text"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORY_HEADING"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_subcat_desc"
				type="list"
				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_cat_num_articles"
				type="list"
				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_cat_tags"
				type="list"
				label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

		</fieldset>

		<fieldset name="advanced"
label="JGLOBAL_LIST_LAYOUT_OPTIONS"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>
			<field
				name="show_pagination_limit"
				type="list"
				label="JGLOBAL_DISPLAY_SELECT_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="filter_field"
				type="list"
				label="JGLOBAL_FILTER_FIELD_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="hide">JHIDE</option>
				<option value="title">JGLOBAL_TITLE</option>
				<option value="author">JAUTHOR</option>
				<option value="hits"
requires="hits">JGLOBAL_HITS</option>
				<option value="tag">JTAG</option>
				<option value="month">JMONTH_PUBLISHED</option>
			</field>

			<field
				name="show_headings"
				type="list"
				label="JGLOBAL_SHOW_HEADINGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="list_show_date"
				type="list"
				label="JGLOBAL_SHOW_DATE_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field
				name="date_format"
				type="text"
				label="JGLOBAL_DATE_FORMAT_LABEL"
				description="JGLOBAL_DATE_FORMAT_DESC"
				useglobal="true"
			/>

			<field
				name="list_show_hits"
				type="list"
				label="JGLOBAL_LIST_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="list_show_author"
				type="list"
				label="JGLOBAL_LIST_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="list_show_votes"
				type="votelist"
				label="JGLOBAL_LIST_VOTES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0"
requires="vote">JHIDE</option>
				<option value="1"
requires="vote">JSHOW</option>
			</field>

			<field
				name="list_show_ratings"
				type="votelist"
				label="JGLOBAL_LIST_RATINGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0"
requires="vote">JHIDE</option>
				<option value="1"
requires="vote">JSHOW</option>
			</field>

			<field
				name="spacer1"
				type="spacer"
				hr="true"
			/>

			<field
				name="orderby_pri"
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field
				name="orderby_sec"
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				useglobal="true"
				validate="options"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits"
requires="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits"
requires="hits">JGLOBAL_LEAST_HITS</option>
				<option
value="random">JGLOBAL_RANDOM_ORDER</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank" requires="vote">
JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field
				name="order_date"
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
			</field>

			<field
				name="show_pagination"
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field
				name="show_pagination_results"
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="display_num"
				type="list"
				label="JGLOBAL_NUMBER_ITEMS_LIST_LABEL"
				default=""
				useglobal="true"
				validate="options"
				>
				<option value="5">J5</option>
				<option value="10">J10</option>
				<option value="15">J15</option>
				<option value="20">J20</option>
				<option value="25">J25</option>
				<option value="30">J30</option>
				<option value="50">J50</option>
				<option value="100">J100</option>
				<option value="0">JALL</option>
			</field>

			<field
				name="show_featured"
				type="list"
				label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
				useglobal="true"
				default=""
				validate="options"
				>
				<option value="show">JSHOW</option>
				<option value="hide">JHIDE</option>
				<option value="only">JONLY</option>
			</field>
		</fieldset>

		<fieldset name="article"
			label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>

			<field
				name="article_layout"
				type="componentlayout"
				label="JGLOBAL_FIELD_LAYOUT_LABEL"
				description="JGLOBAL_FIELD_LAYOUT_DESC"
				class="form-select"
				menuitems="true"
				extension="com_content"
				view="article"
			/>

			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_associations"
				type="assoc"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="votelist"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>
		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">

			<field
				name="show_feed_link"
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="feed_summary"
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[&�*aa"tmpl/category/default_children.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

$lang   = $this->getLanguage();
$user   = $this->getCurrentUser();
$groups = $user->getAuthorisedViewLevels();
?>

<?php if (count($this->children[$this->category->id]) > 0) :
?>
    <?php foreach ($this->children[$this->category->id] as $id
=> $child) : ?>
        <?php // Check whether category access level allows access to
subcategories. ?>
        <?php if (in_array($child->access, $groups)) : ?>
            <?php if
($this->params->get('show_empty_categories') ||
$child->getNumItems(true) || count($child->getChildren())) : ?>
            <div class="com-content-category__children">
                <?php if ($lang->isRtl()) : ?>
                <h3 class="page-header item-title">
                    <?php if
($this->params->get('show_cat_num_articles', 1)) : ?>
                        <span class="badge bg-info tip
hasTooltip" title="<?php echo
HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS');
?>">
                            <?php echo $child->getNumItems(true);
?>
                        </span>
                    <?php endif; ?>
                    <a href="<?php echo
Route::_(RouteHelper::getCategoryRoute($child->id,
$child->language)); ?>">
                    <?php echo $this->escape($child->title);
?></a>

                    <?php if (count($child->getChildren()) > 0
&& $this->maxLevel > 1) : ?>
                        <a href="#category-<?php echo
$child->id; ?>" data-bs-toggle="collapse"
class="btn btn-sm float-end" aria-label="<?php echo
Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
                    <?php endif; ?>
                </h3>
                <?php else : ?>
                <h3 class="page-header item-title"><a
href="<?php echo
Route::_(RouteHelper::getCategoryRoute($child->id,
$child->language)); ?>">
                    <?php echo $this->escape($child->title);
?></a>
                    <?php if
($this->params->get('show_cat_num_articles', 1)) : ?>
                        <span class="badge bg-info tip
hasTooltip" title="<?php echo
HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS');
?>">
                            <?php echo $child->getNumItems(true);
?>
                        </span>
                    <?php endif; ?>

                    <?php if (count($child->getChildren()) > 0
&& $this->maxLevel > 1) : ?>
                        <a href="#category-<?php echo
$child->id; ?>" data-bs-toggle="collapse"
class="btn btn-sm float-end" aria-label="<?php echo
Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
                    <?php endif; ?>
                </h3>
                <?php endif; ?>
                <?php if
($this->params->get('show_subcat_desc') == 1) : ?>
                    <?php if ($child->description) : ?>
                        <div class="category-desc">
                            <?php echo
HTMLHelper::_('content.prepare', $child->description,
'', 'com_content.category'); ?>
                        </div>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if (count($child->getChildren()) > 0
&& $this->maxLevel > 1) : ?>
                <div class="collapse fade"
id="category-<?php echo $child->id; ?>">
                    <?php
                    $this->children[$child->id] =
$child->getChildren();
                    $this->category = $child;
                    $this->maxLevel--;
                    echo $this->loadTemplate('children');
                    $this->category = $child->getParent();
                    $this->maxLevel++;
                    ?>
                </div>
                <?php endif; ?>

            </div>
            <?php endif; ?>
        <?php endif; ?>
    <?php endforeach; ?>
<?php endif; ?>
PK��[*m�DDtmpl/category/blog_children.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2010 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

$lang   = $this->getLanguage();
$user   = $this->getCurrentUser();
$groups = $user->getAuthorisedViewLevels();

if ($this->maxLevel != 0 &&
count($this->children[$this->category->id]) > 0) : ?>
    <?php foreach ($this->children[$this->category->id] as $id
=> $child) : ?>
        <?php // Check whether category access level allows access to
subcategories. ?>
        <?php if (in_array($child->access, $groups)) : ?>
            <?php if
($this->params->get('show_empty_categories') ||
$child->numitems || count($child->getChildren())) : ?>
            <div class="com-content-category-blog__child">
                <?php if ($lang->isRtl()) : ?>
                <h3 class="page-header item-title">
                    <?php if
($this->params->get('show_cat_num_articles', 1)) : ?>
                        <span class="badge bg-info tip">
                            <?php echo $child->getNumItems(true);
?>
                        </span>
                    <?php endif; ?>
                    <a href="<?php echo
Route::_(RouteHelper::getCategoryRoute($child->id,
$child->language)); ?>">
                    <?php echo $this->escape($child->title);
?></a>

                    <?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
                        <a href="#category-<?php echo
$child->id; ?>" data-bs-toggle="collapse"
class="btn btn-sm float-end" aria-label="<?php echo
Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
                    <?php endif; ?>
                </h3>
                <?php else : ?>
                <h3 class="page-header item-title"><a
href="<?php echo
Route::_(RouteHelper::getCategoryRoute($child->id,
$child->language)); ?>">
                    <?php echo $this->escape($child->title);
?></a>
                    <?php if
($this->params->get('show_cat_num_articles', 1)) : ?>
                        <span class="badge bg-info">
                            <?php echo
Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
                            <?php echo $child->getNumItems(true);
?>
                        </span>
                    <?php endif; ?>

                    <?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
                        <a href="#category-<?php echo
$child->id; ?>" data-bs-toggle="collapse"
class="btn btn-sm float-end" aria-label="<?php echo
Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span
class="icon-plus"
aria-hidden="true"></span></a>
                    <?php endif; ?>
                </h3>
                <?php endif; ?>

                <?php if
($this->params->get('show_subcat_desc') == 1) : ?>
                    <?php if ($child->description) : ?>
                    <div
class="com-content-category-blog__description category-desc">
                        <?php echo
HTMLHelper::_('content.prepare', $child->description,
'', 'com_content.category'); ?>
                    </div>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if ($this->maxLevel > 1 &&
count($child->getChildren()) > 0) : ?>
                <div class="com-content-category-blog__children
collapse fade" id="category-<?php echo $child->id;
?>">
                    <?php
                    $this->children[$child->id] =
$child->getChildren();
                    $this->category = $child;
                    $this->maxLevel--;
                    echo $this->loadTemplate('children');
                    $this->category = $child->getParent();
                    $this->maxLevel++;
                    ?>
                </div>
                <?php endif; ?>
            </div>
            <?php endif; ?>
        <?php endif; ?>
    <?php endforeach; ?>

<?php endif;
PK��[4|�Jddtmpl/category/blog.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;

$app = Factory::getApplication();

$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare',
[$this->category->extension . '.categories',
&$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;

$results = $app->triggerEvent('onContentAfterTitle',
[$this->category->extension . '.categories',
&$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));

$results = $app->triggerEvent('onContentBeforeDisplay',
[$this->category->extension . '.categories',
&$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));

$results = $app->triggerEvent('onContentAfterDisplay',
[$this->category->extension . '.categories',
&$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));

$htag    = $this->params->get('show_page_heading') ?
'h2' : 'h1';

?>
<div class="com-content-category-blog blog">
    <?php if ($this->params->get('show_page_heading')) :
?>
        <div class="page-header">
            <h1> <?php echo
$this->escape($this->params->get('page_heading')); ?>
</h1>
        </div>
    <?php endif; ?>

    <?php if ($this->params->get('show_category_title',
1)) : ?>
    <<?php echo $htag; ?>>
        <?php echo $this->category->title; ?>
    </<?php echo $htag; ?>>
    <?php endif; ?>
    <?php echo $afterDisplayTitle; ?>

    <?php if ($this->params->get('show_cat_tags', 1)
&& !empty($this->category->tags->itemTags)) : ?>
        <?php $this->category->tagLayout = new
FileLayout('joomla.content.tags'); ?>
        <?php echo
$this->category->tagLayout->render($this->category->tags->itemTags);
?>
    <?php endif; ?>

    <?php if ($beforeDisplayContent || $afterDisplayContent ||
$this->params->get('show_description', 1) ||
$this->params->def('show_description_image', 1)) : ?>
        <div class="category-desc clearfix">
            <?php if
($this->params->get('show_description_image') &&
$this->category->getParams()->get('image')) : ?>
                <?php echo LayoutHelper::render(
                    'joomla.html.image',
                    [
                        'src' =>
$this->category->getParams()->get('image'),
                        'alt' =>
empty($this->category->getParams()->get('image_alt'))
&&
empty($this->category->getParams()->get('image_alt_empty'))
? false :
$this->category->getParams()->get('image_alt'),
                    ]
                ); ?>
            <?php endif; ?>
            <?php echo $beforeDisplayContent; ?>
            <?php if
($this->params->get('show_description') &&
$this->category->description) : ?>
                <?php echo HTMLHelper::_('content.prepare',
$this->category->description, '',
'com_content.category'); ?>
            <?php endif; ?>
            <?php echo $afterDisplayContent; ?>
        </div>
    <?php endif; ?>

    <?php if (empty($this->lead_items) &&
empty($this->link_items) && empty($this->intro_items)) :
?>
        <?php if ($this->params->get('show_no_articles',
1)) : ?>
            <div class="alert alert-info">
                <span class="icon-info-circle"
aria-hidden="true"></span><span
class="visually-hidden"><?php echo
Text::_('INFO'); ?></span>
                    <?php echo
Text::_('COM_CONTENT_NO_ARTICLES'); ?>
            </div>
        <?php endif; ?>
    <?php endif; ?>

    <?php if (!empty($this->lead_items)) : ?>
        <div class="com-content-category-blog__items blog-items
items-leading <?php echo
$this->params->get('blog_class_leading'); ?>">
            <?php foreach ($this->lead_items as &$item) : ?>
                <div class="com-content-category-blog__item
blog-item">
                    <?php
                    $this->item = &$item;
                    echo $this->loadTemplate('item');
                    ?>
                </div>
            <?php endforeach; ?>
        </div>
    <?php endif; ?>

    <?php if (!empty($this->intro_items)) : ?>
        <?php $blogClass =
$this->params->get('blog_class', ''); ?>
        <?php if ((int)
$this->params->get('num_columns') > 1) : ?>
            <?php $blogClass .= (int)
$this->params->get('multi_column_order', 0) === 0 ? '
masonry-' : ' columns-'; ?>
            <?php $blogClass .= (int)
$this->params->get('num_columns'); ?>
        <?php endif; ?>
        <div class="com-content-category-blog__items blog-items
<?php echo $blogClass; ?>">
        <?php foreach ($this->intro_items as $key => &$item) :
?>
            <div class="com-content-category-blog__item
blog-item">
                    <?php
                    $this->item = & $item;
                    echo $this->loadTemplate('item');
                    ?>
            </div>
        <?php endforeach; ?>
        </div>
    <?php endif; ?>

    <?php if (!empty($this->link_items)) : ?>
        <div class="items-more">
            <?php echo $this->loadTemplate('links'); ?>
        </div>
    <?php endif; ?>

    <?php if ($this->maxLevel != 0 &&
!empty($this->children[$this->category->id])) : ?>
        <div class="com-content-category-blog__children
cat-children">
            <?php if
($this->params->get('show_category_heading_title_text', 1)
== 1) : ?>
                <h3> <?php echo
Text::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
            <?php endif; ?>
            <?php echo $this->loadTemplate('children');
?> </div>
    <?php endif; ?>
    <?php // Code to add a link to submit an article. ?>
    <?php if
($this->category->getParams()->get('access-create')) :
?>
        <?php echo HTMLHelper::_('contenticon.create',
$this->category, $this->category->params); ?>
    <?php endif; ?>
    <?php if (($this->params->def('show_pagination', 1)
== 1 || ($this->params->get('show_pagination') == 2))
&& ($this->pagination->pagesTotal > 1)) : ?>
        <div class="com-content-category-blog__navigation
w-100">
            <?php if
($this->params->def('show_pagination_results', 1)) : ?>
                <p class="com-content-category-blog__counter
counter float-md-end pt-3 pe-2">
                    <?php echo
$this->pagination->getPagesCounter(); ?>
                </p>
            <?php endif; ?>
            <div
class="com-content-category-blog__pagination">
                <?php echo $this->pagination->getPagesLinks();
?>
            </div>
        </div>
    <?php endif; ?>
</div>
PK��[`�r��tmpl/category/blog_links.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

?>

<ol class="com-content-blog__links">
    <?php foreach ($this->link_items as $item) : ?>
        <li class="com-content-blog__link">
            <a href="<?php echo
Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid,
$item->language)); ?>">
                <?php echo $item->title; ?></a>
        </li>
    <?php endforeach; ?>
</ol>
PK��[ےR�N�N"tmpl/category/default_articles.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_content.articles-list');

// Create some shortcuts.
$n          = count($this->items);
$listOrder  =
$this->escape($this->state->get('list.ordering'));
$listDirn   =
$this->escape($this->state->get('list.direction'));
$langFilter = false;

// Tags filtering based on language filter
if (($this->params->get('filter_field') ===
'tag') && (Multilanguage::isEnabled())) {
    $tagfilter =
ComponentHelper::getParams('com_tags')->get('tag_list_language_filter');

    switch ($tagfilter) {
        case 'current_language':
            $langFilter =
Factory::getApplication()->getLanguage()->getTag();
            break;

        case 'all':
            $langFilter = false;
            break;

        default:
            $langFilter = $tagfilter;
    }
}

// Check for at least one editable article
$isEditable = false;

if (!empty($this->items)) {
    foreach ($this->items as $article) {
        if ($article->params->get('access-edit')) {
            $isEditable = true;
            break;
        }
    }
}

$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
?>

<form action="<?php echo
htmlspecialchars(Uri::getInstance()->toString()); ?>"
method="post" name="adminForm" id="adminForm"
class="com-content-category__articles">
    <?php if ($this->params->get('filter_field') !==
'hide') : ?>
        <div class="com-content__filter btn-group">
            <?php if ($this->params->get('filter_field')
=== 'tag') : ?>
                <span class="visually-hidden">
                    <label class="filter-search-lbl"
for="filter-search">
                        <?php echo
Text::_('JOPTION_SELECT_TAG'); ?>
                    </label>
                </span>
                <select name="filter_tag"
id="filter-search" class="form-select"
onchange="document.adminForm.submit();" >
                    <option value=""><?php echo
Text::_('JOPTION_SELECT_TAG'); ?></option>
                    <?php echo HTMLHelper::_('select.options',
HTMLHelper::_('tag.options', ['filter.published' =>
[1], 'filter.language' => $langFilter], true),
'value', 'text',
$this->state->get('filter.tag')); ?>
                </select>
            <?php elseif
($this->params->get('filter_field') === 'month')
: ?>
                <span class="visually-hidden">
                    <label class="filter-search-lbl"
for="filter-search">
                        <?php echo
Text::_('JOPTION_SELECT_MONTH'); ?>
                    </label>
                </span>
                <select name="filter-search"
id="filter-search" class="form-select"
onchange="document.adminForm.submit();">
                    <option value=""><?php echo
Text::_('JOPTION_SELECT_MONTH'); ?></option>
                    <?php echo HTMLHelper::_('select.options',
HTMLHelper::_('content.months', $this->state),
'value', 'text',
$this->state->get('list.filter')); ?>
                </select>
            <?php else : ?>
                <label class="filter-search-lbl
visually-hidden" for="filter-search">
                    <?php echo Text::_('COM_CONTENT_' .
$this->params->get('filter_field') .
'_FILTER_LABEL'); ?>
                </label>
                <input type="text"
name="filter-search" id="filter-search"
value="<?php echo
$this->escape($this->state->get('list.filter'));
?>" class="inputbox"
onchange="document.adminForm.submit();"
placeholder="<?php echo Text::_('COM_CONTENT_' .
$this->params->get('filter_field') .
'_FILTER_LABEL'); ?>">
            <?php endif; ?>

            <?php if ($this->params->get('filter_field')
!== 'tag' &&
$this->params->get('filter_field') !== 'month') :
?>
                <button type="submit"
name="filter_submit" class="btn
btn-primary"><?php echo
Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
            <?php endif; ?>
            <button type="reset"
name="filter-clear-button" class="btn
btn-secondary"><?php echo
Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
        </div>
    <?php endif; ?>

    <?php if
($this->params->get('show_pagination_limit')) : ?>
        <div class="com-content-category__pagination btn-group
float-end">
            <label for="limit"
class="visually-hidden">
                <?php echo Text::_('JGLOBAL_DISPLAY_NUM');
?>
            </label>
            <?php echo $this->pagination->getLimitBox(); ?>
        </div>
    <?php endif; ?>

    <?php if (empty($this->items)) : ?>
        <?php if ($this->params->get('show_no_articles',
1)) : ?>
            <div class="alert alert-info">
                <span class="icon-info-circle"
aria-hidden="true"></span><span
class="visually-hidden"><?php echo
Text::_('INFO'); ?></span>
                    <?php echo
Text::_('COM_CONTENT_NO_ARTICLES'); ?>
            </div>
        <?php endif; ?>
    <?php else : ?>
        <table class="com-content-category__table category table
table-striped table-bordered table-hover">
            <caption class="visually-hidden">
                <?php echo
Text::_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>
            </caption>
            <thead<?php echo
$this->params->get('show_headings', '1') ?
'' : ' class="visually-hidden"'; ?>>
                <tr>
                    <th scope="col"
id="categorylist_header_title">
                        <?php echo HTMLHelper::_('grid.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder,
null, 'asc', '', 'adminForm'); ?>
                    </th>
                    <?php if ($date =
$this->params->get('list_show_date')) : ?>
                        <th scope="col"
id="categorylist_header_date">
                            <?php if ($date === 'created') :
?>
                                <?php echo
HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date .
'_DATE', 'a.created', $listDirn, $listOrder); ?>
                            <?php elseif ($date ===
'modified') : ?>
                                <?php echo
HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date .
'_DATE', 'a.modified', $listDirn, $listOrder); ?>
                            <?php elseif ($date ===
'published') : ?>
                                <?php echo
HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date .
'_DATE', 'a.publish_up', $listDirn, $listOrder); ?>
                            <?php endif; ?>
                        </th>
                    <?php endif; ?>
                    <?php if
($this->params->get('list_show_author')) : ?>
                        <th scope="col"
id="categorylist_header_author">
                            <?php echo
HTMLHelper::_('grid.sort', 'JAUTHOR',
'author', $listDirn, $listOrder); ?>
                        </th>
                    <?php endif; ?>
                    <?php if
($this->params->get('list_show_hits')) : ?>
                        <th scope="col"
id="categorylist_header_hits">
                            <?php echo
HTMLHelper::_('grid.sort', 'JGLOBAL_HITS',
'a.hits', $listDirn, $listOrder); ?>
                        </th>
                    <?php endif; ?>
                    <?php if
($this->params->get('list_show_votes', 0) &&
$this->vote) : ?>
                        <th scope="col"
id="categorylist_header_votes">
                            <?php echo
HTMLHelper::_('grid.sort', 'COM_CONTENT_VOTES',
'rating_count', $listDirn, $listOrder); ?>
                        </th>
                    <?php endif; ?>
                    <?php if
($this->params->get('list_show_ratings', 0) &&
$this->vote) : ?>
                        <th scope="col"
id="categorylist_header_ratings">
                            <?php echo
HTMLHelper::_('grid.sort', 'COM_CONTENT_RATINGS',
'rating', $listDirn, $listOrder); ?>
                        </th>
                    <?php endif; ?>
                    <?php if ($isEditable) : ?>
                        <th scope="col"
id="categorylist_header_edit"><?php echo
Text::_('COM_CONTENT_EDIT_ITEM'); ?></th>
                    <?php endif; ?>
                </tr>
            </thead>
            <tbody>
            <?php foreach ($this->items as $i => $article) : ?>
                <?php if ($this->items[$i]->state ==
ContentComponent::CONDITION_UNPUBLISHED) : ?>
                    <tr class="system-unpublished
cat-list-row<?php echo $i % 2; ?>">
                <?php else : ?>
                    <tr class="cat-list-row<?php echo $i % 2;
?>" >
                <?php endif; ?>
                <th class="list-title"
scope="row">
                    <?php if (in_array($article->access,
$this->user->getAuthorisedViewLevels())) : ?>
                        <a href="<?php echo
Route::_(RouteHelper::getArticleRoute($article->slug,
$article->catid, $article->language)); ?>">
                            <?php echo
$this->escape($article->title); ?>
                        </a>
                        <?php if (Associations::isEnabled() &&
$this->params->get('show_associations')) : ?>
                            <div
class="cat-list-association">
                            <?php $associations =
AssociationHelper::displayAssociations($article->id); ?>
                            <?php foreach ($associations as
$association) : ?>
                                <?php if
($this->params->get('flags', 1) &&
$association['language']->image) : ?>
                                    <?php $flag =
HTMLHelper::_('image', 'mod_languages/' .
$association['language']->image . '.gif',
$association['language']->title_native, ['title'
=> $association['language']->title_native], true); ?>
                                    <a href="<?php echo
Route::_($association['item']); ?>"><?php echo
$flag; ?></a>
                                <?php else : ?>
                                    <?php $class = 'btn
btn-secondary btn-sm btn-' .
strtolower($association['language']->lang_code); ?>
                                    <a class="<?php echo $class;
?>" title="<?php echo
$association['language']->title_native; ?>"
href="<?php echo Route::_($association['item']);
?>"><?php echo
$association['language']->lang_code; ?>
                                        <span
class="visually-hidden"><?php echo
$association['language']->title_native; ?></span>
                                    </a>
                                <?php endif; ?>
                            <?php endforeach; ?>
                            </div>
                        <?php endif; ?>
                    <?php else : ?>
                        <?php
                        echo $this->escape($article->title) . '
: ';
                        $itemId =
Factory::getApplication()->getMenu()->getActive()->id;
                        $link   = new
Uri(Route::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
                        $link->setVar('return',
base64_encode(RouteHelper::getArticleRoute($article->slug,
$article->catid, $article->language)));
                        ?>
                        <a href="<?php echo $link; ?>"
class="register">
                            <?php echo
Text::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
                        </a>
                        <?php if (Associations::isEnabled() &&
$this->params->get('show_associations')) : ?>
                            <div
class="cat-list-association">
                            <?php $associations =
AssociationHelper::displayAssociations($article->id); ?>
                            <?php foreach ($associations as
$association) : ?>
                                <?php if
($this->params->get('flags', 1)) : ?>
                                    <?php $flag =
HTMLHelper::_('image', 'mod_languages/' .
$association['language']->image . '.gif',
$association['language']->title_native, ['title'
=> $association['language']->title_native], true); ?>
                                    <a href="<?php echo
Route::_($association['item']); ?>"><?php echo
$flag; ?></a>
                                <?php else : ?>
                                    <?php $class = 'btn
btn-secondary btn-sm btn-' .
strtolower($association['language']->lang_code); ?>
                                    <a class="<?php echo $class;
?>" title="<?php echo
$association['language']->title_native; ?>"
href="<?php echo Route::_($association['item']);
?>"><?php echo
$association['language']->lang_code; ?>
                                        <span
class="visually-hidden"><?php echo
$association['language']->title_native; ?></span>
                                    </a>
                                <?php endif; ?>
                            <?php endforeach; ?>
                            </div>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if ($article->state ==
ContentComponent::CONDITION_UNPUBLISHED) : ?>
                        <div>
                            <span class="list-published badge
bg-warning text-light">
                                <?php echo
Text::_('JUNPUBLISHED'); ?>
                            </span>
                        </div>
                    <?php endif; ?>
                    <?php if ($article->publish_up > $currentDate)
: ?>
                        <div>
                            <span class="list-published badge
bg-warning text-light">
                                <?php echo
Text::_('JNOTPUBLISHEDYET'); ?>
                            </span>
                        </div>
                    <?php endif; ?>
                    <?php if (!is_null($article->publish_down)
&& $article->publish_down < $currentDate) : ?>
                        <div>
                            <span class="list-published badge
bg-warning text-light">
                                <?php echo
Text::_('JEXPIRED'); ?>
                            </span>
                        </div>
                    <?php endif; ?>
                </th>
                <?php if
($this->params->get('list_show_date')) : ?>
                    <td class="list-date small">
                        <?php
                        echo HTMLHelper::_(
                            'date',
                            $article->displayDate,
                           
$this->escape($this->params->get('date_format',
Text::_('DATE_FORMAT_LC3')))
                        ); ?>
                    </td>
                <?php endif; ?>
                <?php if
($this->params->get('list_show_author', 1)) : ?>
                    <td class="list-author">
                        <?php if (!empty($article->author) ||
!empty($article->created_by_alias)) : ?>
                            <?php $author = $article->author ?>
                            <?php $author =
$article->created_by_alias ?: $author; ?>
                            <?php if (!empty($article->contact_link)
&& $this->params->get('link_author') == true) :
?>
                                <?php if
($this->params->get('show_headings')) : ?>
                                    <?php echo
HTMLHelper::_('link', $article->contact_link, $author); ?>
                                <?php else : ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_WRITTEN_BY',
HTMLHelper::_('link', $article->contact_link, $author)); ?>
                                <?php endif; ?>
                            <?php else : ?>
                                <?php if
($this->params->get('show_headings')) : ?>
                                    <?php echo $author; ?>
                                <?php else : ?>
                                    <?php echo
Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php endif; ?>
                    </td>
                <?php endif; ?>
                <?php if
($this->params->get('list_show_hits', 1)) : ?>
                    <td class="list-hits">
                        <span class="badge bg-info">
                            <?php if
($this->params->get('show_headings')) : ?>
                                <?php echo $article->hits; ?>
                            <?php else : ?>
                                <?php echo
Text::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
                            <?php endif; ?>
                        </span>
                    </td>
                <?php endif; ?>
                <?php if
($this->params->get('list_show_votes', 0) &&
$this->vote) : ?>
                    <td class="list-votes">
                        <span class="badge bg-success">
                            <?php if
($this->params->get('show_headings')) : ?>
                                <?php echo $article->rating_count;
?>
                            <?php else : ?>
                                <?php echo
Text::sprintf('COM_CONTENT_VOTES_COUNT',
$article->rating_count); ?>
                            <?php endif; ?>
                        </span>
                    </td>
                <?php endif; ?>
                <?php if
($this->params->get('list_show_ratings', 0) &&
$this->vote) : ?>
                    <td class="list-ratings">
                        <span class="badge bg-warning
text-light">
                            <?php if
($this->params->get('show_headings')) : ?>
                                <?php echo $article->rating; ?>
                            <?php else : ?>
                                <?php echo
Text::sprintf('COM_CONTENT_RATINGS_COUNT', $article->rating);
?>
                            <?php endif; ?>
                        </span>
                    </td>
                <?php endif; ?>
                <?php if ($isEditable) : ?>
                    <td class="list-edit">
                        <?php if
($article->params->get('access-edit')) : ?>
                            <?php echo
HTMLHelper::_('contenticon.edit', $article, $article->params);
?>
                        <?php endif; ?>
                    </td>
                <?php endif; ?>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    <?php endif; ?>

    <?php // Code to add a link to submit an article. ?>
    <?php if
($this->category->getParams()->get('access-create')) :
?>
        <?php echo HTMLHelper::_('contenticon.create',
$this->category, $this->category->params); ?>
    <?php endif; ?>

    <?php // Add pagination links ?>
    <?php if (!empty($this->items)) : ?>
        <?php if (($this->params->def('show_pagination',
2) == 1  || ($this->params->get('show_pagination') == 2))
&& ($this->pagination->pagesTotal > 1)) : ?>
            <div class="com-content-category__navigation
w-100">
                <?php if
($this->params->def('show_pagination_results', 1)) : ?>
                    <p class="com-content-category__counter counter
float-end pt-3 pe-2">
                        <?php echo
$this->pagination->getPagesCounter(); ?>
                    </p>
                <?php endif; ?>
                <div
class="com-content-category__pagination">
                    <?php echo $this->pagination->getPagesLinks();
?>
                </div>
            </div>
        <?php endif; ?>
    <?php endif; ?>
    <div>
        <input type="hidden" name="filter_order"
value="">
        <input type="hidden" name="filter_order_Dir"
value="">
        <input type="hidden" name="limitstart"
value="">
        <input type="hidden" name="task"
value="">
    </div>
</form>
PK��[�>���tmpl/category/blog_item.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info    = $params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the
parameter.
$assocParam = (Associations::isEnabled() &&
$params->get('show_associations'));

$currentDate   = Factory::getDate()->format('Y-m-d H:i:s');
$isUnpublished = ($this->item->state ==
ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up
> $currentDate)
    || ($this->item->publish_down < $currentDate &&
$this->item->publish_down !== null);

?>

<?php echo LayoutHelper::render('joomla.content.intro_image',
$this->item); ?>

<div class="item-content">
    <?php if ($isUnpublished) : ?>
        <div class="system-unpublished">
    <?php endif; ?>

    <?php echo
LayoutHelper::render('joomla.content.blog_style_default_item_title',
$this->item); ?>

    <?php if ($canEdit) : ?>
        <?php echo
LayoutHelper::render('joomla.content.icons', ['params'
=> $params, 'item' => $this->item]); ?>
    <?php endif; ?>

    <?php // @todo Not that elegant would be nice to group the params
?>
    <?php $useDefList = ($params->get('show_modify_date')
|| $params->get('show_publish_date') ||
$params->get('show_create_date')
        || $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam); ?>

    <?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
        <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'above']); ?>
    <?php endif; ?>
    <?php if ($info == 0 &&
$params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
        <?php echo LayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
    <?php endif; ?>

    <?php if (!$params->get('show_intro')) : ?>
        <?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
        <?php echo $this->item->event->afterDisplayTitle; ?>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
    <?php echo $this->item->event->beforeDisplayContent; ?>

    <?php echo $this->item->introtext; ?>

    <?php if ($info == 1 || $info == 2) : ?>
        <?php if ($useDefList) : ?>
            <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'below']); ?>
        <?php endif; ?>
        <?php if ($params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
            <?php echo
LayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
        <?php endif; ?>
    <?php endif; ?>

    <?php if ($params->get('show_readmore') &&
$this->item->readmore) :
        if ($params->get('access-view')) :
            $link =
Route::_(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language));
        else :
            $menu = Factory::getApplication()->getMenu();
            $active = $menu->getActive();
            $itemId = $active->id;
            $link = new
Uri(Route::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
            $link->setVar('return',
base64_encode(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)));
        endif; ?>

        <?php echo
LayoutHelper::render('joomla.content.readmore', ['item'
=> $this->item, 'params' => $params, 'link'
=> $link]); ?>

    <?php endif; ?>

    <?php if ($isUnpublished) : ?>
        </div>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
    <?php echo $this->item->event->afterDisplayContent; ?>
</div>
PK��[�����tmpl/category/default.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Layout\LayoutHelper;

?>
<div class="com-content-category category-list">

<?php
$this->subtemplatename = 'articles';
echo LayoutHelper::render('joomla.content.category_default',
$this);
?>

</div>
PK��[�֚I6I6tmpl/featured/default.xmlnu�[���<?xml
version="1.0" encoding="UTF-8"?>
<metadata>
	<layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE"
option="COM_CONTENT_FEATURED_VIEW_DEFAULT_OPTION">
		<help
			key = "Menu_Item:_Featured_Articles"
		/>
		<message>
			<![CDATA[COM_CONTENT_CATEGORY_VIEW_FEATURED_DESC]]>
		</message>
	</layout>

	<!-- Add fields to the parameters object for the layout. -->
	<fields name="params">
		<fieldset name="advanced"
label="JGLOBAL_BLOG_LAYOUT_OPTIONS"
description="JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL">
			<field
				name="featured_categories"
				type="category"
				label="COM_CONTENT_FEATURED_CATEGORIES_LABEL"
				extension="com_content"
				multiple="true"
				layout="joomla.form.field.list-fancy-select"
				default=" "
				parentclass="stack span-3"
				>
				<option value=" ">JOPTION_ALL_CATEGORIES</option>
			</field>

			<field
				name="layout_type"
				type="hidden"
				default="blog"
			/>
			<field
				name="num_leading_articles"
				type="number"
				label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
				filter="integer"
				validate="number"
				min="0"
				useglobal="true"
				parentclass="stack span-1"
			/>

			<field
				name="blog_class_leading"
				type="text"
				label="JGLOBAL_BLOG_CLASS_LEADING"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="num_intro_articles"
				type="number"
				label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
				filter="integer"
				validate="number"
				min="0"
				useglobal="true"
				parentclass="stack span-1"
			/>

			<field
				name="blog_class"
				type="text"
				label="JGLOBAL_BLOG_CLASS"
				description="JGLOBAL_BLOG_CLASS_NOTE_DESC"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="CssIdentifier"
			/>

			<field
				name="num_columns"
				type="number"
				label="JGLOBAL_NUM_COLUMNS_LABEL"
				filter="integer"
				validate="number"
				min="0"
				parentclass="stack span-1-inline"
				useglobal="true"
			/>

			<field
				name="multi_column_order"
				type="list"
				label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
				parentclass="stack span-2-inline"
				useglobal="true"
				validate="options"
				>
				<option
value="0">JGLOBAL_BLOG_DOWN_OPTION</option>
				<option
value="1">JGLOBAL_BLOG_ACROSS_OPTION</option>
			</field>

			<field
				name="num_links"
				type="number"
				label="JGLOBAL_NUM_LINKS_LABEL"
				filter="integer"
				validate="number"
				min="0"
				parentclass="stack span-1"
				useglobal="true"
			/>

			<field
				name="link_intro_image"
				type="list"
				label="JGLOBAL_LINKED_INTRO_IMAGE_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="orderby_pri"
				type="list"
				label="JGLOBAL_CATEGORY_ORDER_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2"
				>
				<option value="none">JGLOBAL_NO_ORDER</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
			</field>

			<field
				name="orderby_sec"
				type="list"
				label="JGLOBAL_ARTICLE_ORDER_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option
value="front">COM_CONTENT_FEATURED_ORDER</option>
				<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
				<option
value="date">JGLOBAL_OLDEST_FIRST</option>
				<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
				<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
				<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
				<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
				<option value="hits"
requires="hits">JGLOBAL_MOST_HITS</option>
				<option value="rhits"
requires="hits">JGLOBAL_LEAST_HITS</option>
				<option
value="random">JGLOBAL_RANDOM_ORDER</option>
				<option value="order">JGLOBAL_ORDERING</option>
				<option	value="rorder">JGLOBAL_REVERSE_ORDERING</option>
				<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
				<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
				<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
				<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			</field>

			<field
				name="order_date"
				type="list"
				label="JGLOBAL_ORDERING_DATE_LABEL"
				useglobal="true"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option value="created">JGLOBAL_CREATED</option>
				<option
value="modified">JGLOBAL_MODIFIED</option>
				<option value="published">JPUBLISHED</option>
				<option value="unpublished">JUNPUBLISHED</option>
			</field>

			<field
				name="show_pagination"
				type="list"
				label="JGLOBAL_PAGINATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				parentclass="stack span-2"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
				<option value="2">JGLOBAL_AUTO</option>
			</field>

			<field
				name="show_pagination_results"
				type="list"
				label="JGLOBAL_PAGINATION_RESULTS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				parentclass="stack span-2-inline"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>
		</fieldset>

		<fieldset name="article"
			label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"
			addfieldprefix="Joomla\Component\Content\Administrator\Field"
		>
			<field
				name="show_title"
				type="list"
				label="JGLOBAL_SHOW_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_titles"
				type="list"
				label="JGLOBAL_LINKED_TITLES_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_intro"
				type="list"
				label="JGLOBAL_SHOW_INTRO_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="info_block_position"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
				default=""
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
				<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
				<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
			</field>

			<field
				name="info_block_show_title"
				type="list"
				label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option	value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_category"
				type="list"
				label="JGLOBAL_SHOW_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_category"
				type="list"
				label="JGLOBAL_LINK_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_parent_category"
				type="list"
				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_parent_category"
				type="list"
				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_associations"
				type="assoc"
				label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				>
				<option value="1">JSHOW</option>
				<option value="0">JHIDE</option>
			</field>

			<field
				name="show_author"
				type="list"
				label="JGLOBAL_SHOW_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="link_author"
				type="list"
				label="JGLOBAL_LINK_AUTHOR_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>

			<field
				name="show_create_date"
				type="list"
				label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_modify_date"
				type="list"
				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_publish_date"
				type="list"
				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_item_navigation"
				type="list"
				label="JGLOBAL_SHOW_NAVIGATION_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_vote"
				type="votelist"
				label="JGLOBAL_SHOW_VOTE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option	value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore"
				type="list"
				label="JGLOBAL_SHOW_READMORE_LABEL"
				description="JGLOBAL_SHOW_READMORE_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_readmore_title"
				type="list"
				label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_hits"
				type="list"
				label="JGLOBAL_SHOW_HITS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_tags"
				type="list"
				label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="show_noauth"
				type="list"
				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option
value="use_article">COM_CONTENT_FIELD_VALUE_USE_ARTICLE_SETTINGS</option>
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
		</fieldset>

		<fieldset name="integration"
label="COM_MENUS_INTEGRATION_FIELDSET_LABEL">
			<field
				name="show_feed_link"
				type="list"
				label="JGLOBAL_SHOW_FEED_LINK_LABEL"
				useglobal="true"
				class="form-select-color-state"
				validate="options"
				>
				<option value="0">JHIDE</option>
				<option value="1">JSHOW</option>
			</field>

			<field
				name="feed_summary"
				type="list"
				label="JGLOBAL_FEED_SUMMARY_LABEL"
				useglobal="true"
				validate="options"
				>
				<option value="0">JGLOBAL_INTRO_TEXT</option>
				<option value="1">JGLOBAL_FULL_TEXT</option>
			</field>
		</fieldset>
	</fields>
</metadata>
PK��[䩗���tmpl/featured/default_item.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// Create a shortcut for params.
$params  = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info    =
$this->item->params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the
parameter.
$assocParam = (Associations::isEnabled() &&
$params->get('show_associations'));

$currentDate       = Factory::getDate()->format('Y-m-d
H:i:s');
$isExpired         = !is_null($this->item->publish_down) &&
$this->item->publish_down < $currentDate;
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isUnpublished     = $this->item->state ==
ContentComponent::CONDITION_UNPUBLISHED || $isNotPublishedYet ||
$isExpired;
?>

<?php echo LayoutHelper::render('joomla.content.intro_image',
$this->item); ?>

<div class="item-content">
    <?php if ($isUnpublished) : ?>
        <div class="system-unpublished">
    <?php endif; ?>

    <?php if ($params->get('show_title')) : ?>
        <h2 class="item-title">
        <?php if ($params->get('link_titles') &&
$params->get('access-view')) : ?>
            <a href="<?php echo
Route::_(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)); ?>">
                <?php echo $this->escape($this->item->title);
?>
            </a>
        <?php else : ?>
            <?php echo $this->escape($this->item->title); ?>
        <?php endif; ?>
        </h2>
    <?php endif; ?>

    <?php if ($this->item->state ==
ContentComponent::CONDITION_UNPUBLISHED) : ?>
        <span class="badge bg-warning text-light"><?php
echo Text::_('JUNPUBLISHED'); ?></span>
    <?php endif; ?>
    <?php if ($isNotPublishedYet) : ?>
        <span class="badge bg-warning text-light"><?php
echo Text::_('JNOTPUBLISHEDYET'); ?></span>
    <?php endif; ?>
    <?php if ($isExpired) : ?>
        <span class="badge bg-warning text-light"><?php
echo Text::_('JEXPIRED'); ?></span>
    <?php endif; ?>

    <?php if ($canEdit) : ?>
        <?php echo
LayoutHelper::render('joomla.content.icons', ['params'
=> $params, 'item' => $this->item]); ?>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentAfterTitle" ?>
    <?php echo $this->item->event->afterDisplayTitle; ?>

    <?php // @todo Not that elegant would be nice to group the params
?>
    <?php $useDefList = ($params->get('show_modify_date')
|| $params->get('show_publish_date') ||
$params->get('show_create_date')
        || $params->get('show_hits') ||
$params->get('show_category') ||
$params->get('show_parent_category') ||
$params->get('show_author') || $assocParam); ?>

    <?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
        <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'above']); ?>
    <?php endif; ?>
    <?php if ($info == 0 &&
$params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
        <?php echo LayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
    <?php endif; ?>

    <?php // Content is generated by content plugin event
"onContentBeforeDisplay" ?>
    <?php echo $this->item->event->beforeDisplayContent; ?>

    <?php echo $this->item->introtext; ?>

    <?php if ($info == 1 || $info == 2) : ?>
        <?php if ($useDefList) : ?>
            <?php echo
LayoutHelper::render('joomla.content.info_block',
['item' => $this->item, 'params' => $params,
'position' => 'below']); ?>
        <?php endif; ?>
        <?php if ($params->get('show_tags', 1) &&
!empty($this->item->tags->itemTags)) : ?>
            <?php echo
LayoutHelper::render('joomla.content.tags',
$this->item->tags->itemTags); ?>
        <?php endif; ?>
    <?php endif; ?>

    <?php if ($params->get('show_readmore') &&
$this->item->readmore) :
        if ($params->get('access-view')) :
            $link =
Route::_(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language));
        else :
            $menu = Factory::getApplication()->getMenu();
            $active = $menu->getActive();
            $itemId = $active->id;
            $link = new
Uri(Route::_('index.php?option=com_users&view=login&Itemid='
. $itemId, false));
            $link->setVar('return',
base64_encode(RouteHelper::getArticleRoute($this->item->slug,
$this->item->catid, $this->item->language)));
        endif; ?>

        <?php echo
LayoutHelper::render('joomla.content.readmore', ['item'
=> $this->item, 'params' => $params, 'link'
=> $link]); ?>

    <?php endif; ?>

    <?php if ($isUnpublished) : ?>
        </div>
    <?php endif; ?>

</div>

<?php // Content is generated by content plugin event
"onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
PK��[q%����tmpl/featured/default_links.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

?>
<ul class="com-content-blog__links">
    <?php foreach ($this->link_items as $item) : ?>
        <li class="com-content-blog__link">
            <a href="<?php echo
Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid,
$item->language)); ?>">
                <?php echo $item->title; ?></a>
        </li>
    <?php endforeach; ?>
</ul>
PK��[S�GU�	�	tmpl/featured/default.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

?>
<div class="blog-featured">
    <?php if ($this->params->get('show_page_heading') !=
0) : ?>
    <div class="page-header">
        <h1>
        <?php echo
$this->escape($this->params->get('page_heading')); ?>
        </h1>
    </div>
    <?php endif; ?>

    <?php if (!empty($this->lead_items)) : ?>
        <div class="blog-items items-leading <?php echo
$this->params->get('blog_class_leading'); ?>">
            <?php foreach ($this->lead_items as &$item) : ?>
                <div class="blog-item">
                        <?php
                        $this->item = & $item;
                        echo $this->loadTemplate('item');
                        ?>
                </div>
            <?php endforeach; ?>
        </div>
    <?php endif; ?>

    <?php if (!empty($this->intro_items)) : ?>
        <?php $blogClass =
$this->params->get('blog_class', ''); ?>
        <?php if ((int)
$this->params->get('num_columns') > 1) : ?>
            <?php $blogClass .= (int)
$this->params->get('multi_column_order', 0) === 0 ? '
masonry-' : ' columns-'; ?>
            <?php $blogClass .= (int)
$this->params->get('num_columns'); ?>
        <?php endif; ?>
        <div class="blog-items <?php echo $blogClass;
?>">
        <?php foreach ($this->intro_items as $key => &$item) :
?>
            <div class="blog-item">
                    <?php
                    $this->item = & $item;
                    echo $this->loadTemplate('item');
                    ?>
            </div>
        <?php endforeach; ?>
        </div>
    <?php endif; ?>

    <?php if (!empty($this->link_items)) : ?>
        <div class="items-more">
            <?php echo $this->loadTemplate('links'); ?>
        </div>
    <?php endif; ?>

    <?php if ($this->params->def('show_pagination', 2)
== 1  || ($this->params->get('show_pagination') == 2
&& $this->pagination->pagesTotal > 1)) : ?>
        <div class="w-100">
            <?php if
($this->params->def('show_pagination_results', 1)) : ?>
                <p class="counter float-end pt-3 pe-2">
                    <?php echo
$this->pagination->getPagesCounter(); ?>
                </p>
            <?php endif; ?>
            <?php echo $this->pagination->getPagesLinks(); ?>
        </div>
    <?php endif; ?>

</div>
PK��[�ALLsrc/Service/Category.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Service;

use Joomla\CMS\Categories\Categories;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Category Tree
 *
 * @since  1.6
 */
class Category extends Categories
{
    /**
     * Class constructor
     *
     * @param   array  $options  Array of options
     *
     * @since   1.7.0
     */
    public function __construct($options = [])
    {
        $options['table']     = '#__content';
        $options['extension'] = 'com_content';

        parent::__construct($options);
    }
}
PK��[=VܥN"N"src/Service/Router.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Service;

use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Categories\CategoryFactoryInterface;
use Joomla\CMS\Categories\CategoryInterface;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Component\Router\RouterView;
use Joomla\CMS\Component\Router\RouterViewConfiguration;
use Joomla\CMS\Component\Router\Rules\MenuRules;
use Joomla\CMS\Component\Router\Rules\NomenuRules;
use Joomla\CMS\Component\Router\Rules\StandardRules;
use Joomla\CMS\Menu\AbstractMenu;
use Joomla\Database\DatabaseInterface;
use Joomla\Database\ParameterType;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Routing class of com_content
 *
 * @since  3.3
 */
class Router extends RouterView
{
    /**
     * Flag to remove IDs
     *
     * @var    boolean
     */
    protected $noIDs = false;

    /**
     * The category factory
     *
     * @var CategoryFactoryInterface
     *
     * @since  4.0.0
     */
    private $categoryFactory;

    /**
     * The category cache
     *
     * @var  array
     *
     * @since  4.0.0
     */
    private $categoryCache = [];

    /**
     * The db
     *
     * @var DatabaseInterface
     *
     * @since  4.0.0
     */
    private $db;

    /**
     * Content Component router constructor
     *
     * @param   SiteApplication           $app              The application
object
     * @param   AbstractMenu              $menu             The menu object
to work with
     * @param   CategoryFactoryInterface  $categoryFactory  The category
object
     * @param   DatabaseInterface         $db               The database
object
     */
    public function __construct(SiteApplication $app, AbstractMenu $menu,
CategoryFactoryInterface $categoryFactory, DatabaseInterface $db)
    {
        $this->categoryFactory = $categoryFactory;
        $this->db              = $db;

        $params      = ComponentHelper::getParams('com_content');
        $this->noIDs = (bool) $params->get('sef_ids');
        $categories  = new RouterViewConfiguration('categories');
        $categories->setKey('id');
        $this->registerView($categories);
        $category = new RouterViewConfiguration('category');
        $category->setKey('id')->setParent($categories,
'catid')->setNestable()->addLayout('blog');
        $this->registerView($category);
        $article = new RouterViewConfiguration('article');
        $article->setKey('id')->setParent($category,
'catid');
        $this->registerView($article);
        $this->registerView(new
RouterViewConfiguration('archive'));
        $this->registerView(new
RouterViewConfiguration('featured'));
        $form = new RouterViewConfiguration('form');
        $form->setKey('a_id');
        $this->registerView($form);

        parent::__construct($app, $menu);

        $this->attachRule(new MenuRules($this));
        $this->attachRule(new StandardRules($this));
        $this->attachRule(new NomenuRules($this));
    }

    /**
     * Method to get the segment(s) for a category
     *
     * @param   string  $id     ID of the category to retrieve the segments
for
     * @param   array   $query  The request that is built right now
     *
     * @return  array|string  The segments of this item
     */
    public function getCategorySegment($id, $query)
    {
        $category = $this->getCategories(['access' =>
true])->get($id);

        if ($category) {
            $path    = array_reverse($category->getPath(), true);
            $path[0] = '1:root';

            if ($this->noIDs) {
                foreach ($path as &$segment) {
                    list($id, $segment) = explode(':', $segment,
2);
                }
            }

            return $path;
        }

        return [];
    }

    /**
     * Method to get the segment(s) for a category
     *
     * @param   string  $id     ID of the category to retrieve the segments
for
     * @param   array   $query  The request that is built right now
     *
     * @return  array|string  The segments of this item
     */
    public function getCategoriesSegment($id, $query)
    {
        return $this->getCategorySegment($id, $query);
    }

    /**
     * Method to get the segment(s) for an article
     *
     * @param   string  $id     ID of the article to retrieve the segments
for
     * @param   array   $query  The request that is built right now
     *
     * @return  array|string  The segments of this item
     */
    public function getArticleSegment($id, $query)
    {
        if (!strpos($id, ':')) {
            $id      = (int) $id;
            $dbquery = $this->db->getQuery(true);
           
$dbquery->select($this->db->quoteName('alias'))
               
->from($this->db->quoteName('#__content'))
                ->where($this->db->quoteName('id') .
' = :id')
                ->bind(':id', $id, ParameterType::INTEGER);
            $this->db->setQuery($dbquery);

            $id .= ':' . $this->db->loadResult();
        }

        if ($this->noIDs) {
            list($void, $segment) = explode(':', $id, 2);

            return [$void => $segment];
        }

        return [(int) $id => $id];
    }

    /**
     * Method to get the segment(s) for a form
     *
     * @param   string  $id     ID of the article form to retrieve the
segments for
     * @param   array   $query  The request that is built right now
     *
     * @return  array|string  The segments of this item
     *
     * @since   3.7.3
     */
    public function getFormSegment($id, $query)
    {
        return $this->getArticleSegment($id, $query);
    }

    /**
     * Method to get the id for a category
     *
     * @param   string  $segment  Segment to retrieve the ID for
     * @param   array   $query    The request that is parsed right now
     *
     * @return  mixed   The id of this item or false
     */
    public function getCategoryId($segment, $query)
    {
        if (isset($query['id'])) {
            $category = $this->getCategories(['access' =>
false])->get($query['id']);

            if ($category) {
                foreach ($category->getChildren() as $child) {
                    if ($this->noIDs) {
                        if ($child->alias == $segment) {
                            return $child->id;
                        }
                    } else {
                        if ($child->id == (int) $segment) {
                            return $child->id;
                        }
                    }
                }
            }
        }

        return false;
    }

    /**
     * Method to get the segment(s) for a category
     *
     * @param   string  $segment  Segment to retrieve the ID for
     * @param   array   $query    The request that is parsed right now
     *
     * @return  mixed   The id of this item or false
     */
    public function getCategoriesId($segment, $query)
    {
        return $this->getCategoryId($segment, $query);
    }

    /**
     * Method to get the segment(s) for an article
     *
     * @param   string  $segment  Segment of the article to retrieve the ID
for
     * @param   array   $query    The request that is parsed right now
     *
     * @return  mixed   The id of this item or false
     */
    public function getArticleId($segment, $query)
    {
        if ($this->noIDs) {
            $dbquery = $this->db->getQuery(true);
            $dbquery->select($this->db->quoteName('id'))
               
->from($this->db->quoteName('#__content'))
                ->where(
                    [
                        $this->db->quoteName('alias') .
' = :alias',
                        $this->db->quoteName('catid') .
' = :catid',
                    ]
                )
                ->bind(':alias', $segment)
                ->bind(':catid', $query['id'],
ParameterType::INTEGER);
            $this->db->setQuery($dbquery);

            return (int) $this->db->loadResult();
        }

        return (int) $segment;
    }

    /**
     * Method to get categories from cache
     *
     * @param   array  $options   The options for retrieving categories
     *
     * @return  CategoryInterface  The object containing categories
     *
     * @since   4.0.0
     */
    private function getCategories(array $options = []): CategoryInterface
    {
        $key = serialize($options);

        if (!isset($this->categoryCache[$key])) {
            $this->categoryCache[$key] =
$this->categoryFactory->createCategory($options);
        }

        return $this->categoryCache[$key];
    }
}
PK��[o����
src/Helper/AssociationHelper.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2012 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Helper;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Multilanguage;
use
Joomla\Component\Categories\Administrator\Helper\CategoryAssociationHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Association Helper
 *
 * @since  3.0
 */
abstract class AssociationHelper extends CategoryAssociationHelper
{
    /**
     * Method to get the associations for a given item
     *
     * @param   integer  $id      Id of the item
     * @param   string   $view    Name of the view
     * @param   string   $layout  View layout
     *
     * @return  array   Array of associations for the item
     *
     * @since  3.0
     */
    public static function getAssociations($id = 0, $view = null, $layout =
null)
    {
        $jinput    = Factory::getApplication()->getInput();
        $view      = $view ?? $jinput->get('view');
        $component = $jinput->getCmd('option');
        $id        = empty($id) ? $jinput->getInt('id') : $id;

        if ($layout === null && $jinput->get('view')
== $view && $component == 'com_content') {
            $layout = $jinput->get('layout', '',
'string');
        }

        if ($view === 'article') {
            if ($id) {
                $user      = Factory::getUser();
                $groups    = implode(',',
$user->getAuthorisedViewLevels());
                $db        = Factory::getDbo();
                $advClause = [];

                // Filter by user groups
                $advClause[] = 'c2.access IN (' . $groups .
')';

                // Filter by current language
                $advClause[] = 'c2.language != ' .
$db->quote(Factory::getLanguage()->getTag());

                if (!$user->authorise('core.edit.state',
'com_content') &&
!$user->authorise('core.edit', 'com_content')) {
                    // Filter by start and end dates.
                    $date = Factory::getDate();

                    $nowDate = $db->quote($date->toSql());

                    $advClause[] = '(c2.publish_up IS NULL OR
c2.publish_up <= ' . $nowDate . ')';
                    $advClause[] = '(c2.publish_down IS NULL OR
c2.publish_down >= ' . $nowDate . ')';

                    // Filter by published
                    $advClause[] = 'c2.state = 1';
                }

                $associations = Associations::getAssociations(
                    'com_content',
                    '#__content',
                    'com_content.item',
                    $id,
                    'id',
                    'alias',
                    'catid',
                    $advClause
                );

                $return = [];

                foreach ($associations as $tag => $item) {
                    $return[$tag] =
RouteHelper::getArticleRoute($item->id, (int) $item->catid,
$item->language, $layout);
                }

                return $return;
            }
        }

        if ($view === 'category' || $view ===
'categories') {
            return self::getCategoryAssociations($id,
'com_content', $layout);
        }

        return [];
    }

    /**
     * Method to display in frontend the associations for a given article
     *
     * @param   integer  $id  Id of the article
     *
     * @return  array  An array containing the association URL and the
related language object
     *
     * @since  3.7.0
     */
    public static function displayAssociations($id)
    {
        $return = [];

        if ($associations = self::getAssociations($id,
'article')) {
            $levels    = Factory::getUser()->getAuthorisedViewLevels();
            $languages = LanguageHelper::getLanguages();

            foreach ($languages as $language) {
                // Do not display language when no association
                if (empty($associations[$language->lang_code])) {
                    continue;
                }

                // Do not display language without frontend UI
                if (!\array_key_exists($language->lang_code,
LanguageHelper::getInstalledLanguages(0))) {
                    continue;
                }

                // Do not display language without specific home menu
                if (!\array_key_exists($language->lang_code,
Multilanguage::getSiteHomePages())) {
                    continue;
                }

                // Do not display language without authorized access level
                if (isset($language->access) &&
$language->access && !\in_array($language->access, $levels))
{
                    continue;
                }

                $return[$language->lang_code] = ['item' =>
$associations[$language->lang_code], 'language' =>
$language];
            }
        }

        return $return;
    }
}
PK��[
��iN
N
src/Helper/RouteHelper.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2007 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Helper;

use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Language\Multilanguage;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Route Helper.
 *
 * @since  1.5
 */
abstract class RouteHelper
{
    /**
     * Get the article route.
     *
     * @param   integer  $id        The route of the content item.
     * @param   integer  $catid     The category ID.
     * @param   string   $language  The language code.
     * @param   string   $layout    The layout value.
     *
     * @return  string  The article route.
     *
     * @since   1.5
     */
    public static function getArticleRoute($id, $catid = 0, $language =
null, $layout = null)
    {
        // Create the link
        $link =
'index.php?option=com_content&view=article&id=' . $id;

        if ((int) $catid > 1) {
            $link .= '&catid=' . $catid;
        }

        if (!empty($language) && $language !== '*'
&& Multilanguage::isEnabled()) {
            $link .= '&lang=' . $language;
        }

        if ($layout) {
            $link .= '&layout=' . $layout;
        }

        return $link;
    }

    /**
     * Get the category route.
     *
     * @param   integer  $catid     The category ID.
     * @param   integer  $language  The language code.
     * @param   string   $layout    The layout value.
     *
     * @return  string  The article route.
     *
     * @since   1.5
     */
    public static function getCategoryRoute($catid, $language = 0, $layout
= null)
    {
        if ($catid instanceof CategoryNode) {
            $id = $catid->id;
        } else {
            $id = (int) $catid;
        }

        if ($id < 1) {
            return '';
        }

        $link =
'index.php?option=com_content&view=category&id=' . $id;

        if ($language && $language !== '*' &&
Multilanguage::isEnabled()) {
            $link .= '&lang=' . $language;
        }

        if ($layout) {
            $link .= '&layout=' . $layout;
        }

        return $link;
    }

    /**
     * Get the form route.
     *
     * @param   integer  $id  The form ID.
     *
     * @return  string  The article route.
     *
     * @since   1.5
     */
    public static function getFormRoute($id)
    {
        return
'index.php?option=com_content&task=article.edit&a_id=' .
(int) $id;
    }
}
PK��[�9����src/Helper/QueryHelper.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2007 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Helper;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Database\DatabaseInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Query Helper
 *
 * @since  1.5
 */
class QueryHelper
{
    /**
     * Translate an order code to a field for category ordering.
     *
     * @param   string  $orderby  The ordering code.
     *
     * @return  string  The SQL field(s) to order by.
     *
     * @since   1.5
     */
    public static function orderbyPrimary($orderby)
    {
        switch ($orderby) {
            case 'alpha':
                $orderby = 'c.path, ';
                break;

            case 'ralpha':
                $orderby = 'c.path DESC, ';
                break;

            case 'order':
                $orderby = 'c.lft, ';
                break;

            default:
                $orderby = '';
                break;
        }

        return $orderby;
    }

    /**
     * Translate an order code to a field for article ordering.
     *
     * @param   string             $orderby    The ordering code.
     * @param   string             $orderDate  The ordering code for the
date.
     * @param   DatabaseInterface  $db         The database
     *
     * @return  string  The SQL field(s) to order by.
     *
     * @since   1.5
     */
    public static function orderbySecondary($orderby, $orderDate =
'created', DatabaseInterface $db = null)
    {
        $db = $db ?: Factory::getDbo();

        $queryDate = self::getQueryDate($orderDate, $db);

        switch ($orderby) {
            case 'date':
                $orderby = $queryDate;
                break;

            case 'rdate':
                $orderby = $queryDate . ' DESC ';
                break;

            case 'alpha':
                $orderby = 'a.title';
                break;

            case 'ralpha':
                $orderby = 'a.title DESC';
                break;

            case 'hits':
                $orderby = 'a.hits DESC';
                break;

            case 'rhits':
                $orderby = 'a.hits';
                break;

            case 'rorder':
                $orderby = 'a.ordering DESC';
                break;

            case 'author':
                $orderby = 'author';
                break;

            case 'rauthor':
                $orderby = 'author DESC';
                break;

            case 'front':
                $orderby = 'a.featured DESC, fp.ordering, ' .
$queryDate . ' DESC ';
                break;

            case 'random':
                $orderby = $db->getQuery(true)->rand();
                break;

            case 'vote':
                $orderby = 'a.id DESC ';

                if (PluginHelper::isEnabled('content',
'vote')) {
                    $orderby = 'rating_count DESC ';
                }
                break;

            case 'rvote':
                $orderby = 'a.id ASC ';

                if (PluginHelper::isEnabled('content',
'vote')) {
                    $orderby = 'rating_count ASC ';
                }
                break;

            case 'rank':
                $orderby = 'a.id DESC ';

                if (PluginHelper::isEnabled('content',
'vote')) {
                    $orderby = 'rating DESC ';
                }
                break;

            case 'rrank':
                $orderby = 'a.id ASC ';

                if (PluginHelper::isEnabled('content',
'vote')) {
                    $orderby = 'rating ASC ';
                }
                break;

            default:
                $orderby = 'a.ordering';
                break;
        }

        return $orderby;
    }

    /**
     * Translate an order code to a field for date ordering.
     *
     * @param   string             $orderDate  The ordering code.
     * @param   DatabaseInterface  $db         The database
     *
     * @return  string  The SQL field(s) to order by.
     *
     * @since   1.6
     */
    public static function getQueryDate($orderDate, DatabaseInterface $db =
null)
    {
        $db = $db ?: Factory::getDbo();

        switch ($orderDate) {
            case 'modified':
                $queryDate = ' CASE WHEN a.modified IS NULL THEN
a.created ELSE a.modified END';
                break;

                // Use created if publish_up is not set
            case 'published':
                $queryDate = ' CASE WHEN a.publish_up IS NULL THEN
a.created ELSE a.publish_up END ';
                break;

            case 'unpublished':
                $queryDate = ' CASE WHEN a.publish_down IS NULL THEN
a.created ELSE a.publish_down END ';
                break;
            case 'created':
            default:
                $queryDate = ' a.created ';
                break;
        }

        return $queryDate;
    }

    /**
     * Get join information for the voting query.
     *
     * @param   \Joomla\Registry\Registry  $params  An options object for
the article.
     *
     * @return  array  A named array with "select" and
"join" keys.
     *
     * @since   1.5
     *
     * @deprecated  4.3 will be removed in 6.0
     *              Will be removed without replacement
     */
    public static function buildVotingQuery($params = null)
    {
        if (!$params) {
            $params = ComponentHelper::getParams('com_content');
        }

        $voting = $params->get('show_vote');

        if ($voting) {
            // Calculate voting count
            $select = ' , ROUND(v.rating_sum / v.rating_count) AS
rating, v.rating_count';
            $join   = ' LEFT JOIN #__content_rating AS v ON a.id =
v.content_id';
        } else {
            $select = '';
            $join   = '';
        }

        return ['select' => $select, 'join' =>
$join];
    }
}
PK��[$�|BBsrc/Dispatcher/Dispatcher.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2017 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Dispatcher;

use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\Language\Text;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * ComponentDispatcher class for com_content
 *
 * @since  4.0.0
 */
class Dispatcher extends ComponentDispatcher
{
    /**
     * Dispatch a controller task. Redirecting the user if appropriate.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function dispatch()
    {
        $checkCreateEdit = ($this->input->get('view') ===
'articles' && $this->input->get('layout')
=== 'modal')
            || ($this->input->get('view') ===
'article' && $this->input->get('layout')
=== 'pagebreak');

        if ($checkCreateEdit) {
            // Can create in any category (component permission) or at
least in one category
            $canCreateRecords =
$this->app->getIdentity()->authorise('core.create',
'com_content')
                ||
\count($this->app->getIdentity()->getAuthorisedCategories('com_content',
'core.create')) > 0;

            // Instead of checking edit on all records, we can use **same**
check as the form editing view
            $values           = (array)
$this->app->getUserState('com_content.edit.article.id');
            $isEditingRecords = \count($values);
            $hasAccess        = $canCreateRecords || $isEditingRecords;

            if (!$hasAccess) {
               
$this->app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'),
'warning');

                return;
            }
        }

        parent::dispatch();
    }
}
PK��[��O���src/Model/CategoriesModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * This models supports retrieving lists of article categories.
 *
 * @since  1.6
 */
class CategoriesModel extends ListModel
{
    /**
     * Model context string.
     *
     * @var     string
     */
    public $_context = 'com_content.categories';

    /**
     * The category context (allows other extensions to derived from this
model).
     *
     * @var     string
     */
    protected $_extension = 'com_content';

    /**
     * Parent category of the current one
     *
     * @var    CategoryNode|null
     */
    private $_parent = null;

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @param   string  $ordering   The field to order on.
     * @param   string  $direction  The direction to order on.
     *
     * @return  void
     *
     * @since   1.6
     */
    protected function populateState($ordering = null, $direction = null)
    {
        $app = Factory::getApplication();
        $this->setState('filter.extension',
$this->_extension);

        // Get the parent id if defined.
        $parentId = $app->getInput()->getInt('id');
        $this->setState('filter.parentId', $parentId);

        $params = $app->getParams();
        $this->setState('params', $params);

        $this->setState('filter.published', 1);
        $this->setState('filter.access', true);
    }

    /**
     * Method to get a store id based on model configuration state.
     *
     * This is necessary because the model is used by the component and
     * different modules that might need different sets of data or
different
     * ordering requirements.
     *
     * @param   string  $id  A prefix for the store id.
     *
     * @return  string  A store id.
     */
    protected function getStoreId($id = '')
    {
        // Compile the store id.
        $id .= ':' .
$this->getState('filter.extension');
        $id .= ':' .
$this->getState('filter.published');
        $id .= ':' .
$this->getState('filter.access');
        $id .= ':' .
$this->getState('filter.parentId');

        return parent::getStoreId($id);
    }

    /**
     * Redefine the function and add some properties to make the styling
easier
     *
     * @param   bool  $recursive  True if you want to return children
recursively.
     *
     * @return  mixed  An array of data items on success, false on failure.
     *
     * @since   1.6
     */
    public function getItems($recursive = false)
    {
        $store = $this->getStoreId();

        if (!isset($this->cache[$store])) {
            $app    = Factory::getApplication();
            $menu   = $app->getMenu();
            $active = $menu->getActive();

            if ($active) {
                $params = $active->getParams();
            } else {
                $params = new Registry();
            }

            $options               = [];
            $options['countItems'] =
$params->get('show_cat_num_articles_cat', 1) ||
!$params->get('show_empty_categories_cat', 0);
            $categories            =
Categories::getInstance('Content', $options);
            $this->_parent         =
$categories->get($this->getState('filter.parentId',
'root'));

            if (\is_object($this->_parent)) {
                $this->cache[$store] =
$this->_parent->getChildren($recursive);
            } else {
                $this->cache[$store] = false;
            }
        }

        return $this->cache[$store];
    }

    /**
     * Get the parent.
     *
     * @return  object  An array of data items on success, false on
failure.
     *
     * @since   1.6
     */
    public function getParent()
    {
        if (!\is_object($this->_parent)) {
            $this->getItems();
        }

        return $this->_parent;
    }
}
PK��[��X*ACACsrc/Model/ArticleModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ItemModel;
use Joomla\CMS\Table\Table;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\IpHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Article Model
 *
 * @since  1.5
 */
class ArticleModel extends ItemModel
{
    /**
     * Model context string.
     *
     * @var        string
     */
    protected $_context = 'com_content.article';

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @since   1.6
     *
     * @return void
     */
    protected function populateState()
    {
        $app = Factory::getApplication();

        // Load state from the request.
        $pk = $app->getInput()->getInt('id');
        $this->setState('article.id', $pk);

        $offset = $app->getInput()->getUint('limitstart');
        $this->setState('list.offset', $offset);

        // Load the parameters.
        $params = $app->getParams();
        $this->setState('params', $params);

        $user = $this->getCurrentUser();

        // If $pk is set then authorise on complete asset, else on
component only
        $asset = empty($pk) ? 'com_content' :
'com_content.article.' . $pk;

        if ((!$user->authorise('core.edit.state', $asset))
&& (!$user->authorise('core.edit', $asset))) {
            $this->setState('filter.published',
ContentComponent::CONDITION_PUBLISHED);
            $this->setState('filter.archived',
ContentComponent::CONDITION_ARCHIVED);
        }

        $this->setState('filter.language',
Multilanguage::isEnabled());
    }

    /**
     * Method to get article data.
     *
     * @param   integer  $pk  The id of the article.
     *
     * @return  object|boolean  Menu item data object on success, boolean
false
     */
    public function getItem($pk = null)
    {
        $user = $this->getCurrentUser();

        $pk = (int) ($pk ?: $this->getState('article.id'));

        if ($this->_item === null) {
            $this->_item = [];
        }

        if (!isset($this->_item[$pk])) {
            try {
                $db    = $this->getDatabase();
                $query = $db->getQuery(true);

                $query->select(
                    $this->getState(
                        'item.select',
                        [
                            $db->quoteName('a.id'),
                            $db->quoteName('a.asset_id'),
                            $db->quoteName('a.title'),
                            $db->quoteName('a.alias'),
                            $db->quoteName('a.introtext'),
                            $db->quoteName('a.fulltext'),
                            $db->quoteName('a.state'),
                            $db->quoteName('a.catid'),
                            $db->quoteName('a.created'),
                            $db->quoteName('a.created_by'),
                           
$db->quoteName('a.created_by_alias'),
                            $db->quoteName('a.modified'),
                            $db->quoteName('a.modified_by'),
                            $db->quoteName('a.checked_out'),
                           
$db->quoteName('a.checked_out_time'),
                            $db->quoteName('a.publish_up'),
                            $db->quoteName('a.publish_down'),
                            $db->quoteName('a.images'),
                            $db->quoteName('a.urls'),
                            $db->quoteName('a.attribs'),
                            $db->quoteName('a.version'),
                            $db->quoteName('a.ordering'),
                            $db->quoteName('a.metakey'),
                            $db->quoteName('a.metadesc'),
                            $db->quoteName('a.access'),
                            $db->quoteName('a.hits'),
                            $db->quoteName('a.metadata'),
                            $db->quoteName('a.featured'),
                            $db->quoteName('a.language'),
                        ]
                    )
                )
                    ->select(
                        [
                            $db->quoteName('fp.featured_up'),
                           
$db->quoteName('fp.featured_down'),
                            $db->quoteName('c.title',
'category_title'),
                            $db->quoteName('c.alias',
'category_alias'),
                            $db->quoteName('c.access',
'category_access'),
                            $db->quoteName('c.language',
'category_language'),
                            $db->quoteName('fp.ordering'),
                            $db->quoteName('u.name',
'author'),
                            $db->quoteName('parent.title',
'parent_title'),
                            $db->quoteName('parent.id',
'parent_id'),
                            $db->quoteName('parent.path',
'parent_route'),
                            $db->quoteName('parent.alias',
'parent_alias'),
                            $db->quoteName('parent.language',
'parent_language'),
                            'ROUND(' .
$db->quoteName('v.rating_sum') . ' / ' .
$db->quoteName('v.rating_count') . ', 1) AS '
                                . $db->quoteName('rating'),
                            $db->quoteName('v.rating_count',
'rating_count'),
                        ]
                    )
                    ->from($db->quoteName('#__content',
'a'))
                    ->join(
                        'INNER',
                        $db->quoteName('#__categories',
'c'),
                        $db->quoteName('c.id') . ' =
' . $db->quoteName('a.catid')
                    )
                    ->join('LEFT',
$db->quoteName('#__content_frontpage', 'fp'),
$db->quoteName('fp.content_id') . ' = ' .
$db->quoteName('a.id'))
                    ->join('LEFT',
$db->quoteName('#__users', 'u'),
$db->quoteName('u.id') . ' = ' .
$db->quoteName('a.created_by'))
                    ->join('LEFT',
$db->quoteName('#__categories', 'parent'),
$db->quoteName('parent.id') . ' = ' .
$db->quoteName('c.parent_id'))
                    ->join('LEFT',
$db->quoteName('#__content_rating', 'v'),
$db->quoteName('a.id') . ' = ' .
$db->quoteName('v.content_id'))
                    ->where(
                        [
                            $db->quoteName('a.id') . ' =
:pk',
                            $db->quoteName('c.published') .
' > 0',
                        ]
                    )
                    ->bind(':pk', $pk,
ParameterType::INTEGER);

                // Filter by language
                if ($this->getState('filter.language')) {
                   
$query->whereIn($db->quoteName('a.language'),
[Factory::getLanguage()->getTag(), '*'],
ParameterType::STRING);
                }

                if (
                    !$user->authorise('core.edit.state',
'com_content.article.' . $pk)
                    && !$user->authorise('core.edit',
'com_content.article.' . $pk)
                ) {
                    // Filter by start and end dates.
                    $nowDate = Factory::getDate()->toSql();

                    $query->extendWhere(
                        'AND',
                        [
                            $db->quoteName('a.publish_up') .
' IS NULL',
                            $db->quoteName('a.publish_up') .
' <= :publishUp',
                        ],
                        'OR'
                    )
                        ->extendWhere(
                            'AND',
                            [
                               
$db->quoteName('a.publish_down') . ' IS NULL',
                               
$db->quoteName('a.publish_down') . ' >=
:publishDown',
                            ],
                            'OR'
                        )
                        ->bind([':publishUp',
':publishDown'], $nowDate);
                }

                // Filter by published state.
                $published =
$this->getState('filter.published');
                $archived  =
$this->getState('filter.archived');

                if (is_numeric($published)) {
                   
$query->whereIn($db->quoteName('a.state'), [(int)
$published, (int) $archived]);
                }

                $db->setQuery($query);

                $data = $db->loadObject();

                if (empty($data)) {
                    throw new
\Exception(Text::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND'), 404);
                }

                // Check for published state if filter set.
                if ((is_numeric($published) || is_numeric($archived))
&& ($data->state != $published && $data->state !=
$archived)) {
                    throw new
\Exception(Text::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND'), 404);
                }

                // Convert parameter fields to objects.
                $registry = new Registry($data->attribs);

                $data->params = clone
$this->getState('params');
                $data->params->merge($registry);

                $data->metadata = new Registry($data->metadata);

                // Technically guest could edit an article, but lets not
check that to improve performance a little.
                if (!$user->get('guest')) {
                    $userId = $user->get('id');
                    $asset  = 'com_content.article.' .
$data->id;

                    // Check general edit permission first.
                    if ($user->authorise('core.edit', $asset))
{
                        $data->params->set('access-edit',
true);
                    } elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset)) {
                        // Now check if edit.own is available.
                        // Check for a valid user and that they are the
owner.
                        if ($userId == $data->created_by) {
                           
$data->params->set('access-edit', true);
                        }
                    }
                }

                // Compute view access permissions.
                if ($access =
$this->getState('filter.access')) {
                    // If the access filter has been set, we already know
this user can view.
                    $data->params->set('access-view',
true);
                } else {
                    // If no access filter is set, the layout takes some
responsibility for display of limited information.
                    $user   = $this->getCurrentUser();
                    $groups = $user->getAuthorisedViewLevels();

                    if ($data->catid == 0 || $data->category_access
=== null) {
                        $data->params->set('access-view',
\in_array($data->access, $groups));
                    } else {
                        $data->params->set('access-view',
\in_array($data->access, $groups) &&
\in_array($data->category_access, $groups));
                    }
                }

                $this->_item[$pk] = $data;
            } catch (\Exception $e) {
                if ($e->getCode() == 404) {
                    // Need to go through the error handler to allow
Redirect to work.
                    throw $e;
                }

                $this->setError($e);
                $this->_item[$pk] = false;
            }
        }

        return $this->_item[$pk];
    }

    /**
     * Increment the hit counter for the article.
     *
     * @param   integer  $pk  Optional primary key of the article to
increment.
     *
     * @return  boolean  True if successful; false otherwise and internal
error set.
     */
    public function hit($pk = 0)
    {
        $input    = Factory::getApplication()->getInput();
        $hitcount = $input->getInt('hitcount', 1);

        if ($hitcount) {
            $pk = (!empty($pk)) ? $pk : (int)
$this->getState('article.id');

            $table = Table::getInstance('Content',
'\\Joomla\\CMS\\Table\\');
            $table->hit($pk);
        }

        return true;
    }

    /**
     * Save user vote on article
     *
     * @param   integer  $pk    Joomla Article Id
     * @param   integer  $rate  Voting rate
     *
     * @return  boolean          Return true on success
     */
    public function storeVote($pk = 0, $rate = 0)
    {
        $pk   = (int) $pk;
        $rate = (int) $rate;

        if ($rate >= 1 && $rate <= 5 && $pk > 0) {
            $userIP = IpHelper::getIp();

            // Initialize variables.
            $db    = $this->getDatabase();
            $query = $db->getQuery(true);

            // Create the base select statement.
            $query->select('*')
                ->from($db->quoteName('#__content_rating'))
                ->where($db->quoteName('content_id') .
' = :pk')
                ->bind(':pk', $pk, ParameterType::INTEGER);

            // Set the query and load the result.
            $db->setQuery($query);

            // Check for a database error.
            try {
                $rating = $db->loadObject();
            } catch (\RuntimeException $e) {
               
Factory::getApplication()->enqueueMessage($e->getMessage(),
'error');

                return false;
            }

            // There are no ratings yet, so lets insert our rating
            if (!$rating) {
                $query = $db->getQuery(true);

                // Create the base insert statement.
               
$query->insert($db->quoteName('#__content_rating'))
                    ->columns(
                        [
                            $db->quoteName('content_id'),
                            $db->quoteName('lastip'),
                            $db->quoteName('rating_sum'),
                            $db->quoteName('rating_count'),
                        ]
                    )
                    ->values(':pk, :ip, :rate, 1')
                    ->bind(':pk', $pk, ParameterType::INTEGER)
                    ->bind(':ip', $userIP)
                    ->bind(':rate', $rate,
ParameterType::INTEGER);

                // Set the query and execute the insert.
                $db->setQuery($query);

                try {
                    $db->execute();
                } catch (\RuntimeException $e) {
                   
Factory::getApplication()->enqueueMessage($e->getMessage(),
'error');

                    return false;
                }
            } else {
                if ($userIP != $rating->lastip) {
                    $query = $db->getQuery(true);

                    // Create the base update statement.
                   
$query->update($db->quoteName('#__content_rating'))
                        ->set(
                            [
                                $db->quoteName('rating_count')
. ' = ' . $db->quoteName('rating_count') . ' +
1',
                                $db->quoteName('rating_sum') .
' = ' . $db->quoteName('rating_sum') . ' +
:rate',
                                $db->quoteName('lastip') .
' = :ip',
                            ]
                        )
                       
->where($db->quoteName('content_id') . ' = :pk')
                        ->bind(':rate', $rate,
ParameterType::INTEGER)
                        ->bind(':ip', $userIP)
                        ->bind(':pk', $pk,
ParameterType::INTEGER);

                    // Set the query and execute the update.
                    $db->setQuery($query);

                    try {
                        $db->execute();
                    } catch (\RuntimeException $e) {
                       
Factory::getApplication()->enqueueMessage($e->getMessage(),
'error');

                        return false;
                    }
                } else {
                    return false;
                }
            }

            $this->cleanCache();

            return true;
        }

       
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_CONTENT_INVALID_RATING',
$rate), 'error');

        return false;
    }

    /**
     * Cleans the cache of com_content and content modules
     *
     * @param   string   $group     The cache group
     * @param   integer  $clientId  No longer used, will be removed without
replacement
     *                              @deprecated   4.3 will be removed in
6.0
     *
     * @return  void
     *
     * @since   3.9.9
     */
    protected function cleanCache($group = null, $clientId = 0)
    {
        parent::cleanCache('com_content');
        parent::cleanCache('mod_articles_archive');
        parent::cleanCache('mod_articles_categories');
        parent::cleanCache('mod_articles_category');
        parent::cleanCache('mod_articles_latest');
        parent::cleanCache('mod_articles_news');
        parent::cleanCache('mod_articles_popular');
    }
}
PK��[�|�ݯ�src/Model/FeaturedModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Factory;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Frontpage Component Model
 *
 * @since  1.5
 */
class FeaturedModel extends ArticlesModel
{
    /**
     * Model context string.
     *
     * @var     string
     */
    public $_context = 'com_content.frontpage';

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @param   string  $ordering   The field to order on.
     * @param   string  $direction  The direction to order on.
     *
     * @return  void
     *
     * @since   1.6
     */
    protected function populateState($ordering = null, $direction = null)
    {
        parent::populateState($ordering, $direction);

        $app   = Factory::getApplication();
        $input = $app->getInput();
        $user  = $app->getIdentity();

        // List state information
        $limitstart = $input->getUint('limitstart', 0);
        $this->setState('list.start', $limitstart);

        $params = $this->state->params;

        if ($menu = $app->getMenu()->getActive()) {
            $menuParams = $menu->getParams();
        } else {
            $menuParams = new Registry();
        }

        $mergedParams = clone $menuParams;
        $mergedParams->merge($params);

        $this->setState('params', $mergedParams);

        $limit = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');
        $this->setState('list.limit', $limit);
        $this->setState('list.links',
$params->get('num_links'));

        $this->setState('filter.frontpage', true);

        if ((!$user->authorise('core.edit.state',
'com_content')) &&
(!$user->authorise('core.edit', 'com_content'))) {
            // Filter on published for those who do not have edit or
edit.state rights.
            $this->setState('filter.published',
ContentComponent::CONDITION_PUBLISHED);
        } else {
            $this->setState('filter.published',
[ContentComponent::CONDITION_UNPUBLISHED,
ContentComponent::CONDITION_PUBLISHED]);
        }

        // Process show_noauth parameter
        if (!$params->get('show_noauth')) {
            $this->setState('filter.access', true);
        } else {
            $this->setState('filter.access', false);
        }

        // Check for category selection
        if ($params->get('featured_categories') &&
implode(',', $params->get('featured_categories')) ==
true) {
            $featuredCategories =
$params->get('featured_categories');
            $this->setState('filter.frontpage.categories',
$featuredCategories);
        }

        $articleOrderby   = $params->get('orderby_sec',
'rdate');
        $articleOrderDate = $params->get('order_date');
        $categoryOrderby  = $params->def('orderby_pri',
'');

        $secondary = QueryHelper::orderbySecondary($articleOrderby,
$articleOrderDate, $this->getDatabase());
        $primary   = QueryHelper::orderbyPrimary($categoryOrderby);

        $this->setState('list.ordering', $primary . $secondary
. ', a.created DESC');
        $this->setState('list.direction', '');
    }

    /**
     * Method to get a list of articles.
     *
     * @return  mixed  An array of objects on success, false on failure.
     */
    public function getItems()
    {
        $params = clone $this->getState('params');
        $limit  = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');

        if ($limit > 0) {
            $this->setState('list.limit', $limit);

            return parent::getItems();
        }

        return [];
    }

    /**
     * Method to get a store id based on model configuration state.
     *
     * This is necessary because the model is used by the component and
     * different modules that might need different sets of data or
different
     * ordering requirements.
     *
     * @param   string  $id  A prefix for the store id.
     *
     * @return  string  A store id.
     */
    protected function getStoreId($id = '')
    {
        // Compile the store id.
        $id .= $this->getState('filter.frontpage');

        return parent::getStoreId($id);
    }

    /**
     * Get the list of items.
     *
     * @return  \Joomla\Database\DatabaseQuery
     */
    protected function getListQuery()
    {
        // Create a new query object.
        $query = parent::getListQuery();

        // Filter by categories
        $featuredCategories =
$this->getState('filter.frontpage.categories');

        if (\is_array($featuredCategories) &&
!\in_array('', $featuredCategories)) {
            $query->where('a.catid IN (' .
implode(',', ArrayHelper::toInteger($featuredCategories)) .
')');
        }

        return $query;
    }
}
PK��[YE��;�;src/Model/CategoryModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Table\Table;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * This models supports retrieving a category, the articles associated with
the category,
 * sibling, child and parent categories.
 *
 * @since  1.5
 */
class CategoryModel extends ListModel
{
    /**
     * Category items data
     *
     * @var  array
     */
    protected $_item = null;

    /**
     * Array of articles in the category
     *
     * @var \stdClass[]
     */
    protected $_articles = null;

    /**
     * Category left and right of this one
     *
     * @var  CategoryNode[]|null
     */
    protected $_siblings = null;

    /**
     * Array of child-categories
     *
     * @var  CategoryNode[]|null
     */
    protected $_children = null;

    /**
     * Parent category of the current one
     *
     * @var  CategoryNode|null
     */
    protected $_parent = null;

    /**
     * Model context string.
     *
     * @var  string
     */
    protected $_context = 'com_content.category';

    /**
     * The category that applies.
     *
     * @var  object
     */
    protected $_category = null;

    /**
     * The list of categories.
     *
     * @var  array
     */
    protected $_categories = null;

    /**
     * @param   array  $config  An optional associative array of
configuration settings.
     *
     * @since   1.6
     */
    public function __construct($config = [])
    {
        if (empty($config['filter_fields'])) {
            $config['filter_fields'] = [
                'id', 'a.id',
                'title', 'a.title',
                'alias', 'a.alias',
                'checked_out', 'a.checked_out',
                'checked_out_time',
'a.checked_out_time',
                'catid', 'a.catid',
'category_title',
                'state', 'a.state',
                'access', 'a.access',
'access_level',
                'created', 'a.created',
                'created_by', 'a.created_by',
                'modified', 'a.modified',
                'ordering', 'a.ordering',
                'featured', 'a.featured',
                'language', 'a.language',
                'hits', 'a.hits',
                'publish_up', 'a.publish_up',
                'publish_down', 'a.publish_down',
                'author', 'a.author',
                'filter_tag',
            ];
        }

        parent::__construct($config);
    }

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @param   string  $ordering   The field to order on.
     * @param   string  $direction  The direction to order on.
     *
     * @return  void
     *
     * @since   1.6
     */
    protected function populateState($ordering = null, $direction = null)
    {
        $app = Factory::getApplication();

        $pk  = $app->getInput()->getInt('id');
        $this->setState('category.id', $pk);

        // Load the parameters. Merge Global and Menu Item params into new
object
        $params = $app->getParams();
        $this->setState('params', $params);

        $user  = $this->getCurrentUser();
        $asset = 'com_content';

        if ($pk) {
            $asset .= '.category.' . $pk;
        }

        if ((!$user->authorise('core.edit.state', $asset))
&& (!$user->authorise('core.edit', $asset))) {
            // Limit to published for people who can't edit or
edit.state.
            $this->setState('filter.published', 1);
        } else {
            $this->setState('filter.published', [0, 1]);
        }

        // Process show_noauth parameter
        if (!$params->get('show_noauth')) {
            $this->setState('filter.access', true);
        } else {
            $this->setState('filter.access', false);
        }

        $itemid = $app->getInput()->get('id', 0,
'int') . ':' .
$app->getInput()->get('Itemid', 0, 'int');

        $value =
$this->getUserStateFromRequest('com_content.category.filter.'
. $itemid . '.tag', 'filter_tag', 0, 'int',
false);
        $this->setState('filter.tag', $value);

        // Optional filter text
        $search =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter-search', 'filter-search',
'', 'string');
        $this->setState('list.filter', $search);

        // Filter.order
        $orderCol =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order', 'filter_order',
'', 'string');

        if (!\in_array($orderCol, $this->filter_fields)) {
            $orderCol = 'a.ordering';
        }

        $this->setState('list.ordering', $orderCol);

        $listOrder =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order_Dir', 'filter_order_Dir',
'', 'cmd');

        if (!\in_array(strtoupper($listOrder), ['ASC',
'DESC', ''])) {
            $listOrder = 'ASC';
        }

        $this->setState('list.direction', $listOrder);

        $this->setState('list.start',
$app->getInput()->get('limitstart', 0, 'uint'));

        // Set limit for query. If list, use parameter. If blog, add blog
parameters for limit.
        if (($app->getInput()->get('layout') ===
'blog') || $params->get('layout_type') ===
'blog') {
            $limit = $params->get('num_leading_articles') +
$params->get('num_intro_articles') +
$params->get('num_links');
            $this->setState('list.links',
$params->get('num_links'));
        } else {
            $limit =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.limit', 'limit',
$params->get('display_num'), 'uint');
        }

        $this->setState('list.limit', $limit);

        // Set the depth of the category query based on parameter
        $showSubcategories =
$params->get('show_subcategory_content', '0');

        if ($showSubcategories) {
            $this->setState('filter.max_category_levels',
$params->get('show_subcategory_content', '1'));
            $this->setState('filter.subcategories', true);
        }

        $this->setState('filter.language',
Multilanguage::isEnabled());

        $this->setState('layout',
$app->getInput()->getString('layout'));

        // Set the featured articles state
        $this->setState('filter.featured',
$params->get('show_featured'));
    }

    /**
     * Get the articles in the category
     *
     * @return  array|bool  An array of articles or false if an error
occurs.
     *
     * @since   1.5
     */
    public function getItems()
    {
        $limit = $this->getState('list.limit');

        if ($this->_articles === null && $category =
$this->getCategory()) {
            $model =
$this->bootComponent('com_content')->getMVCFactory()
                ->createModel('Articles', 'Site',
['ignore_request' => true]);
            $model->setState('params',
Factory::getApplication()->getParams());
            $model->setState('filter.category_id',
$category->id);
            $model->setState('filter.published',
$this->getState('filter.published'));
            $model->setState('filter.access',
$this->getState('filter.access'));
            $model->setState('filter.language',
$this->getState('filter.language'));
            $model->setState('filter.featured',
$this->getState('filter.featured'));
            $model->setState('list.ordering',
$this->_buildContentOrderBy());
            $model->setState('list.start',
$this->getState('list.start'));
            $model->setState('list.limit', $limit);
            $model->setState('list.direction',
$this->getState('list.direction'));
            $model->setState('list.filter',
$this->getState('list.filter'));
            $model->setState('filter.tag',
$this->getState('filter.tag'));

            // Filter.subcategories indicates whether to include articles
from subcategories in the list or blog
            $model->setState('filter.subcategories',
$this->getState('filter.subcategories'));
            $model->setState('filter.max_category_levels',
$this->getState('filter.max_category_levels'));
            $model->setState('list.links',
$this->getState('list.links'));

            if ($limit >= 0) {
                $this->_articles = $model->getItems();

                if ($this->_articles === false) {
                    $this->setError($model->getError());
                }
            } else {
                $this->_articles = [];
            }

            $this->_pagination = $model->getPagination();
        }

        return $this->_articles;
    }

    /**
     * Build the orderby for the query
     *
     * @return  string  $orderby portion of query
     *
     * @since   1.5
     */
    protected function _buildContentOrderBy()
    {
        $app       = Factory::getApplication();
        $db        = $this->getDatabase();
        $params    = $this->state->params;
        $itemid    = $app->getInput()->get('id', 0,
'int') . ':' .
$app->getInput()->get('Itemid', 0, 'int');
        $orderCol  =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order', 'filter_order',
'', 'string');
        $orderDirn =
$app->getUserStateFromRequest('com_content.category.list.' .
$itemid . '.filter_order_Dir', 'filter_order_Dir',
'', 'cmd');
        $orderby   = ' ';

        if (!\in_array($orderCol, $this->filter_fields)) {
            $orderCol = null;
        }

        if (!\in_array(strtoupper($orderDirn), ['ASC',
'DESC', ''])) {
            $orderDirn = 'ASC';
        }

        if ($orderCol && $orderDirn) {
            $orderby .= $db->escape($orderCol) . ' ' .
$db->escape($orderDirn) . ', ';
        }

        $articleOrderby   = $params->get('orderby_sec',
'rdate');
        $articleOrderDate = $params->get('order_date');
        $categoryOrderby  = $params->def('orderby_pri',
'');
        $secondary        = QueryHelper::orderbySecondary($articleOrderby,
$articleOrderDate, $this->getDatabase()) . ', ';
        $primary          = QueryHelper::orderbyPrimary($categoryOrderby);

        $orderby .= $primary . ' ' . $secondary . '
a.created ';

        return $orderby;
    }

    /**
     * Method to get a JPagination object for the data set.
     *
     * @return  \Joomla\CMS\Pagination\Pagination  A JPagination object for
the data set.
     *
     * @since   3.0.1
     */
    public function getPagination()
    {
        if (empty($this->_pagination)) {
            return null;
        }

        return $this->_pagination;
    }

    /**
     * Method to get category data for the current category
     *
     * @return  object
     *
     * @since   1.5
     */
    public function getCategory()
    {
        if (!\is_object($this->_item)) {
            if (isset($this->state->params)) {
                $params                = $this->state->params;
                $options               = [];
                $options['countItems'] =
$params->get('show_cat_num_articles', 1) ||
!$params->get('show_empty_categories_cat', 0);
                $options['access']     =
$params->get('check_access_rights', 1);
            } else {
                $options['countItems'] = 0;
            }

            $categories  = Categories::getInstance('Content',
$options);
            $this->_item =
$categories->get($this->getState('category.id',
'root'));

            // Compute selected asset permissions.
            if (\is_object($this->_item)) {
                $user  = $this->getCurrentUser();
                $asset = 'com_content.category.' .
$this->_item->id;

                // Check general create permission.
                if ($user->authorise('core.create', $asset)) {
                   
$this->_item->getParams()->set('access-create', true);
                }

                // @todo: Why aren't we lazy loading the children and
siblings?
                $this->_children = $this->_item->getChildren();
                $this->_parent   = false;

                if ($this->_item->getParent()) {
                    $this->_parent = $this->_item->getParent();
                }

                $this->_rightsibling = $this->_item->getSibling();
                $this->_leftsibling  =
$this->_item->getSibling(false);
            } else {
                $this->_children = false;
                $this->_parent   = false;
            }
        }

        return $this->_item;
    }

    /**
     * Get the parent category.
     *
     * @return  mixed  An array of categories or false if an error occurs.
     *
     * @since   1.6
     */
    public function getParent()
    {
        if (!\is_object($this->_item)) {
            $this->getCategory();
        }

        return $this->_parent;
    }

    /**
     * Get the left sibling (adjacent) categories.
     *
     * @return  mixed  An array of categories or false if an error occurs.
     *
     * @since   1.6
     */
    public function &getLeftSibling()
    {
        if (!\is_object($this->_item)) {
            $this->getCategory();
        }

        return $this->_leftsibling;
    }

    /**
     * Get the right sibling (adjacent) categories.
     *
     * @return  mixed  An array of categories or false if an error occurs.
     *
     * @since   1.6
     */
    public function &getRightSibling()
    {
        if (!\is_object($this->_item)) {
            $this->getCategory();
        }

        return $this->_rightsibling;
    }

    /**
     * Get the child categories.
     *
     * @return  mixed  An array of categories or false if an error occurs.
     *
     * @since   1.6
     */
    public function &getChildren()
    {
        if (!\is_object($this->_item)) {
            $this->getCategory();
        }

        // Order subcategories
        if ($this->_children) {
            $params = $this->getState()->get('params');

            $orderByPri = $params->get('orderby_pri');

            if ($orderByPri === 'alpha' || $orderByPri ===
'ralpha') {
                $this->_children =
ArrayHelper::sortObjects($this->_children, 'title',
($orderByPri === 'alpha') ? 1 : (-1));
            }
        }

        return $this->_children;
    }

    /**
     * Increment the hit counter for the category.
     *
     * @param   int  $pk  Optional primary key of the category to
increment.
     *
     * @return  boolean True if successful; false otherwise and internal
error set.
     */
    public function hit($pk = 0)
    {
        $input    = Factory::getApplication()->getInput();
        $hitcount = $input->getInt('hitcount', 1);

        if ($hitcount) {
            $pk = (!empty($pk)) ? $pk : (int)
$this->getState('category.id');

            $table = Table::getInstance('Category',
'\\Joomla\\CMS\\Table\\');
            $table->hit($pk);
        }

        return true;
    }
}
PK��[G���ɋɋsrc/Model/ArticlesModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * This models supports retrieving lists of articles.
 *
 * @since  1.6
 */
class ArticlesModel extends ListModel
{
    /**
     * Constructor.
     *
     * @param   array  $config  An optional associative array of
configuration settings.
     *
     * @see     \JController
     * @since   1.6
     */
    public function __construct($config = [])
    {
        if (empty($config['filter_fields'])) {
            $config['filter_fields'] = [
                'id', 'a.id',
                'title', 'a.title',
                'alias', 'a.alias',
                'checked_out', 'a.checked_out',
                'checked_out_time',
'a.checked_out_time',
                'catid', 'a.catid',
'category_title',
                'state', 'a.state',
                'access', 'a.access',
'access_level',
                'created', 'a.created',
                'created_by', 'a.created_by',
                'ordering', 'a.ordering',
                'featured', 'a.featured',
                'language', 'a.language',
                'hits', 'a.hits',
                'publish_up', 'a.publish_up',
                'publish_down', 'a.publish_down',
                'images', 'a.images',
                'urls', 'a.urls',
                'filter_tag',
            ];
        }

        parent::__construct($config);
    }

    /**
     * Method to auto-populate the model state.
     *
     * This method should only be called once per instantiation and is
designed
     * to be called on the first call to the getState() method unless the
model
     * configuration flag to ignore the request is set.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @param   string  $ordering   An optional ordering field.
     * @param   string  $direction  An optional direction (asc|desc).
     *
     * @return  void
     *
     * @since   3.0.1
     */
    protected function populateState($ordering = 'ordering',
$direction = 'ASC')
    {
        $app   = Factory::getApplication();
        $input = $app->getInput();

        // List state information
        $value = $input->get('limit',
$app->get('list_limit', 0), 'uint');
        $this->setState('list.limit', $value);

        $value = $input->get('limitstart', 0,
'uint');
        $this->setState('list.start', $value);

        $value = $input->get('filter_tag', 0,
'uint');
        $this->setState('filter.tag', $value);

        $orderCol = $input->get('filter_order',
'a.ordering');

        if (!\in_array($orderCol, $this->filter_fields)) {
            $orderCol = 'a.ordering';
        }

        $this->setState('list.ordering', $orderCol);

        $listOrder = $input->get('filter_order_Dir',
'ASC');

        if (!\in_array(strtoupper($listOrder), ['ASC',
'DESC', ''])) {
            $listOrder = 'ASC';
        }

        $this->setState('list.direction', $listOrder);

        $params = $app->getParams();
        $this->setState('params', $params);

        $user = $this->getCurrentUser();

        if ((!$user->authorise('core.edit.state',
'com_content')) &&
(!$user->authorise('core.edit', 'com_content'))) {
            // Filter on published for those who do not have edit or
edit.state rights.
            $this->setState('filter.published',
ContentComponent::CONDITION_PUBLISHED);
        }

        $this->setState('filter.language',
Multilanguage::isEnabled());

        // Process show_noauth parameter
        if ((!$params->get('show_noauth')) ||
(!ComponentHelper::getParams('com_content')->get('show_noauth')))
{
            $this->setState('filter.access', true);
        } else {
            $this->setState('filter.access', false);
        }

        $this->setState('layout',
$input->getString('layout'));
    }

    /**
     * Method to get a store id based on model configuration state.
     *
     * This is necessary because the model is used by the component and
     * different modules that might need different sets of data or
different
     * ordering requirements.
     *
     * @param   string  $id  A prefix for the store id.
     *
     * @return  string  A store id.
     *
     * @since   1.6
     */
    protected function getStoreId($id = '')
    {
        // Compile the store id.
        $id .= ':' .
serialize($this->getState('filter.published'));
        $id .= ':' .
$this->getState('filter.access');
        $id .= ':' .
$this->getState('filter.featured');
        $id .= ':' .
serialize($this->getState('filter.article_id'));
        $id .= ':' .
$this->getState('filter.article_id.include');
        $id .= ':' .
serialize($this->getState('filter.category_id'));
        $id .= ':' .
$this->getState('filter.category_id.include');
        $id .= ':' .
serialize($this->getState('filter.author_id'));
        $id .= ':' .
$this->getState('filter.author_id.include');
        $id .= ':' .
serialize($this->getState('filter.author_alias'));
        $id .= ':' .
$this->getState('filter.author_alias.include');
        $id .= ':' .
$this->getState('filter.date_filtering');
        $id .= ':' .
$this->getState('filter.date_field');
        $id .= ':' .
$this->getState('filter.start_date_range');
        $id .= ':' .
$this->getState('filter.end_date_range');
        $id .= ':' .
$this->getState('filter.relative_date');
        $id .= ':' .
serialize($this->getState('filter.tag'));

        return parent::getStoreId($id);
    }

    /**
     * Get the master query for retrieving a list of articles subject to
the model state.
     *
     * @return  \Joomla\Database\DatabaseQuery
     *
     * @since   1.6
     */
    protected function getListQuery()
    {
        $user = $this->getCurrentUser();

        // Create a new query object.
        $db = $this->getDatabase();

        /** @var \Joomla\Database\DatabaseQuery $query */
        $query = $db->getQuery(true);

        $nowDate = Factory::getDate()->toSql();

        $conditionArchived    = ContentComponent::CONDITION_ARCHIVED;
        $conditionUnpublished = ContentComponent::CONDITION_UNPUBLISHED;

        // Select the required fields from the table.
        $query->select(
            $this->getState(
                'list.select',
                [
                    $db->quoteName('a.id'),
                    $db->quoteName('a.title'),
                    $db->quoteName('a.alias'),
                    $db->quoteName('a.introtext'),
                    $db->quoteName('a.fulltext'),
                    $db->quoteName('a.checked_out'),
                    $db->quoteName('a.checked_out_time'),
                    $db->quoteName('a.catid'),
                    $db->quoteName('a.created'),
                    $db->quoteName('a.created_by'),
                    $db->quoteName('a.created_by_alias'),
                    $db->quoteName('a.modified'),
                    $db->quoteName('a.modified_by'),
                    // Use created if publish_up is null
                    'CASE WHEN ' .
$db->quoteName('a.publish_up') . ' IS NULL THEN ' .
$db->quoteName('a.created')
                        . ' ELSE ' .
$db->quoteName('a.publish_up') . ' END AS ' .
$db->quoteName('publish_up'),
                    $db->quoteName('a.publish_down'),
                    $db->quoteName('a.images'),
                    $db->quoteName('a.urls'),
                    $db->quoteName('a.attribs'),
                    $db->quoteName('a.metadata'),
                    $db->quoteName('a.metakey'),
                    $db->quoteName('a.metadesc'),
                    $db->quoteName('a.access'),
                    $db->quoteName('a.hits'),
                    $db->quoteName('a.featured'),
                    $db->quoteName('a.language'),
                   
$query->length($db->quoteName('a.fulltext')) . ' AS
' . $db->quoteName('readmore'),
                    $db->quoteName('a.ordering'),
                ]
            )
        )
            ->select(
                [
                    $db->quoteName('fp.featured_up'),
                    $db->quoteName('fp.featured_down'),
                    // Published/archived article in archived category is
treated as archived article. If category is not published then force 0.
                    'CASE WHEN ' .
$db->quoteName('c.published') . ' = 2 AND ' .
$db->quoteName('a.state') . ' > 0 THEN ' .
$conditionArchived
                        . ' WHEN ' .
$db->quoteName('c.published') . ' != 1 THEN ' .
$conditionUnpublished
                        . ' ELSE ' .
$db->quoteName('a.state') . ' END AS ' .
$db->quoteName('state'),
                    $db->quoteName('c.title',
'category_title'),
                    $db->quoteName('c.path',
'category_route'),
                    $db->quoteName('c.access',
'category_access'),
                    $db->quoteName('c.alias',
'category_alias'),
                    $db->quoteName('c.language',
'category_language'),
                    $db->quoteName('c.published'),
                    $db->quoteName('c.published',
'parents_published'),
                    $db->quoteName('c.lft'),
                    'CASE WHEN ' .
$db->quoteName('a.created_by_alias') . ' > ' .
$db->quote(' ') . ' THEN ' .
$db->quoteName('a.created_by_alias')
                        . ' ELSE ' .
$db->quoteName('ua.name') . ' END AS ' .
$db->quoteName('author'),
                    $db->quoteName('ua.email',
'author_email'),
                    $db->quoteName('uam.name',
'modified_by_name'),
                    $db->quoteName('parent.title',
'parent_title'),
                    $db->quoteName('parent.id',
'parent_id'),
                    $db->quoteName('parent.path',
'parent_route'),
                    $db->quoteName('parent.alias',
'parent_alias'),
                    $db->quoteName('parent.language',
'parent_language'),
                ]
            )
            ->from($db->quoteName('#__content',
'a'))
            ->join('LEFT',
$db->quoteName('#__categories', 'c'),
$db->quoteName('c.id') . ' = ' .
$db->quoteName('a.catid'))
            ->join('LEFT',
$db->quoteName('#__users', 'ua'),
$db->quoteName('ua.id') . ' = ' .
$db->quoteName('a.created_by'))
            ->join('LEFT',
$db->quoteName('#__users', 'uam'),
$db->quoteName('uam.id') . ' = ' .
$db->quoteName('a.modified_by'))
            ->join('LEFT',
$db->quoteName('#__categories', 'parent'),
$db->quoteName('parent.id') . ' = ' .
$db->quoteName('c.parent_id'));

        $params      = $this->getState('params');
        $orderby_sec = $params->get('orderby_sec');

        // Join over the frontpage articles if required.
        $frontpageJoin = 'LEFT';

        if ($this->getState('filter.frontpage')) {
            if ($orderby_sec === 'front') {
               
$query->select($db->quoteName('fp.ordering'));
                $frontpageJoin = 'INNER';
            } else {
                $query->where($db->quoteName('a.featured')
. ' = 1');
            }

            $query->where(
                [
                    '(' .
$db->quoteName('fp.featured_up') . ' IS NULL OR ' .
$db->quoteName('fp.featured_up') . ' <=
:frontpageUp)',
                    '(' .
$db->quoteName('fp.featured_down') . ' IS NULL OR '
. $db->quoteName('fp.featured_down') . ' >=
:frontpageDown)',
                ]
            )
                ->bind(':frontpageUp', $nowDate)
                ->bind(':frontpageDown', $nowDate);
        } elseif ($orderby_sec === 'front' ||
$this->getState('list.ordering') === 'fp.ordering')
{
            $query->select($db->quoteName('fp.ordering'));
        }

        $query->join($frontpageJoin,
$db->quoteName('#__content_frontpage', 'fp'),
$db->quoteName('fp.content_id') . ' = ' .
$db->quoteName('a.id'));

        if (PluginHelper::isEnabled('content', 'vote'))
{
            // Join on voting table
            $query->select(
                [
                    'COALESCE(NULLIF(ROUND(' .
$db->quoteName('v.rating_sum') . ' / ' .
$db->quoteName('v.rating_count') . ', 1), 0), 0)'
                        . ' AS ' .
$db->quoteName('rating'),
                    'COALESCE(NULLIF(' .
$db->quoteName('v.rating_count') . ', 0), 0) AS ' .
$db->quoteName('rating_count'),
                ]
            )
                ->join('LEFT',
$db->quoteName('#__content_rating', 'v'),
$db->quoteName('a.id') . ' = ' .
$db->quoteName('v.content_id'));
        }

        // Filter by access level.
        if ($this->getState('filter.access', true)) {
            $groups = $this->getState('filter.viewlevels',
$user->getAuthorisedViewLevels());
            $query->whereIn($db->quoteName('a.access'),
$groups)
                ->whereIn($db->quoteName('c.access'),
$groups);
        }

        // Filter by published state
        $condition = $this->getState('filter.published');

        if (is_numeric($condition) && $condition == 2) {
            /**
             * If category is archived then article has to be published or
archived.
             * Or category is published then article has to be archived.
             */
            $query->where('((' .
$db->quoteName('c.published') . ' = 2 AND ' .
$db->quoteName('a.state') . ' >
:conditionUnpublished)'
                . ' OR (' .
$db->quoteName('c.published') . ' = 1 AND ' .
$db->quoteName('a.state') . ' =
:conditionArchived))')
                ->bind(':conditionUnpublished',
$conditionUnpublished, ParameterType::INTEGER)
                ->bind(':conditionArchived',
$conditionArchived, ParameterType::INTEGER);
        } elseif (is_numeric($condition)) {
            $condition = (int) $condition;

            // Category has to be published
            $query->where($db->quoteName('c.published') .
' = 1 AND ' . $db->quoteName('a.state') . ' =
:condition')
                ->bind(':condition', $condition,
ParameterType::INTEGER);
        } elseif (\is_array($condition)) {
            // Category has to be published
            $query->where(
                $db->quoteName('c.published') . ' = 1 AND
' . $db->quoteName('a.state')
                    . ' IN (' . implode(',',
$query->bindArray($condition)) . ')'
            );
        }

        // Filter by featured state
        $featured = $this->getState('filter.featured');

        switch ($featured) {
            case 'hide':
                $query->extendWhere(
                    'AND',
                    [
                        $db->quoteName('a.featured') . '
= 0',
                        '(' .
$db->quoteName('fp.featured_up') . ' IS NOT NULL AND
' . $db->quoteName('fp.featured_up') . ' >=
:featuredUp)',
                        '(' .
$db->quoteName('fp.featured_down') . ' IS NOT NULL AND
' . $db->quoteName('fp.featured_down') . ' <=
:featuredDown)',
                    ],
                    'OR'
                )
                    ->bind(':featuredUp', $nowDate)
                    ->bind(':featuredDown', $nowDate);
                break;

            case 'only':
                $query->where(
                    [
                        $db->quoteName('a.featured') . '
= 1',
                        '(' .
$db->quoteName('fp.featured_up') . ' IS NULL OR ' .
$db->quoteName('fp.featured_up') . ' <=
:featuredUp)',
                        '(' .
$db->quoteName('fp.featured_down') . ' IS NULL OR '
. $db->quoteName('fp.featured_down') . ' >=
:featuredDown)',
                    ]
                )
                    ->bind(':featuredUp', $nowDate)
                    ->bind(':featuredDown', $nowDate);
                break;

            case 'show':
            default:
                // Normally we do not discriminate between
featured/unfeatured items.
                break;
        }

        // Filter by a single or group of articles.
        $articleId = $this->getState('filter.article_id');

        if (is_numeric($articleId)) {
            $articleId = (int) $articleId;
            $type      =
$this->getState('filter.article_id.include', true) ? ' =
' : ' <> ';
            $query->where($db->quoteName('a.id') . $type .
':articleId')
                ->bind(':articleId', $articleId,
ParameterType::INTEGER);
        } elseif (\is_array($articleId)) {
            $articleId = ArrayHelper::toInteger($articleId);

            if ($this->getState('filter.article_id.include',
true)) {
                $query->whereIn($db->quoteName('a.id'),
$articleId);
            } else {
                $query->whereNotIn($db->quoteName('a.id'),
$articleId);
            }
        }

        // Filter by a single or group of categories
        $categoryId = $this->getState('filter.category_id');

        if (is_numeric($categoryId)) {
            $type =
$this->getState('filter.category_id.include', true) ? ' =
' : ' <> ';

            // Add subcategory check
            $includeSubcategories =
$this->getState('filter.subcategories', false);

            if ($includeSubcategories) {
                $categoryId = (int) $categoryId;
                $levels     = (int)
$this->getState('filter.max_category_levels', 1);

                // Create a subquery for the subcategory list
                $subQuery = $db->getQuery(true)
                    ->select($db->quoteName('sub.id'))
                    ->from($db->quoteName('#__categories',
'sub'))
                    ->join(
                        'INNER',
                        $db->quoteName('#__categories',
'this'),
                        $db->quoteName('sub.lft') . '
> ' . $db->quoteName('this.lft')
                            . ' AND ' .
$db->quoteName('sub.rgt') . ' < ' .
$db->quoteName('this.rgt')
                    )
                    ->where($db->quoteName('this.id') .
' = :subCategoryId');

                $query->bind(':subCategoryId', $categoryId,
ParameterType::INTEGER);

                if ($levels >= 0) {
                   
$subQuery->where($db->quoteName('sub.level') . ' <=
' . $db->quoteName('this.level') . ' +
:levels');
                    $query->bind(':levels', $levels,
ParameterType::INTEGER);
                }

                // Add the subquery to the main query
                $query->where(
                    '(' . $db->quoteName('a.catid')
. $type . ':categoryId OR ' .
$db->quoteName('a.catid') . ' IN (' . $subQuery .
'))'
                );
                $query->bind(':categoryId', $categoryId,
ParameterType::INTEGER);
            } else {
                $query->where($db->quoteName('a.catid') .
$type . ':categoryId');
                $query->bind(':categoryId', $categoryId,
ParameterType::INTEGER);
            }
        } elseif (\is_array($categoryId) && (\count($categoryId)
> 0)) {
            $categoryId = ArrayHelper::toInteger($categoryId);

            if (!empty($categoryId)) {
                if
($this->getState('filter.category_id.include', true)) {
                   
$query->whereIn($db->quoteName('a.catid'), $categoryId);
                } else {
                   
$query->whereNotIn($db->quoteName('a.catid'), $categoryId);
                }
            }
        }

        // Filter by author
        $authorId    = $this->getState('filter.author_id');
        $authorWhere = '';

        if (is_numeric($authorId)) {
            $authorId    = (int) $authorId;
            $type        =
$this->getState('filter.author_id.include', true) ? ' =
' : ' <> ';
            $authorWhere = $db->quoteName('a.created_by') .
$type . ':authorId';
            $query->bind(':authorId', $authorId,
ParameterType::INTEGER);
        } elseif (\is_array($authorId)) {
            $authorId = array_values(array_filter($authorId,
'is_numeric'));

            if ($authorId) {
                $type        =
$this->getState('filter.author_id.include', true) ? '
IN' : ' NOT IN';
                $authorWhere = $db->quoteName('a.created_by')
. $type . ' (' . implode(',',
$query->bindArray($authorId)) . ')';
            }
        }

        // Filter by author alias
        $authorAlias      =
$this->getState('filter.author_alias');
        $authorAliasWhere = '';

        if (\is_string($authorAlias)) {
            $type             =
$this->getState('filter.author_alias.include', true) ? '
= ' : ' <> ';
            $authorAliasWhere =
$db->quoteName('a.created_by_alias') . $type .
':authorAlias';
            $query->bind(':authorAlias', $authorAlias);
        } elseif (\is_array($authorAlias) && !empty($authorAlias))
{
            $type             =
$this->getState('filter.author_alias.include', true) ? '
IN' : ' NOT IN';
            $authorAliasWhere =
$db->quoteName('a.created_by_alias') . $type
                . ' (' . implode(',',
$query->bindArray($authorAlias, ParameterType::STRING)) . ')';
        }

        if (!empty($authorWhere) && !empty($authorAliasWhere)) {
            $query->where('(' . $authorWhere . ' OR
' . $authorAliasWhere . ')');
        } elseif (!empty($authorWhere) || !empty($authorAliasWhere)) {
            // One of these is empty, the other is not so we just add both
            $query->where($authorWhere . $authorAliasWhere);
        }

        // Filter by start and end dates.
        if ((!$user->authorise('core.edit.state',
'com_content')) &&
(!$user->authorise('core.edit', 'com_content'))) {
            $query->where(
                [
                    '(' .
$db->quoteName('a.publish_up') . ' IS NULL OR ' .
$db->quoteName('a.publish_up') . ' <=
:publishUp)',
                    '(' .
$db->quoteName('a.publish_down') . ' IS NULL OR ' .
$db->quoteName('a.publish_down') . ' >=
:publishDown)',
                ]
            )
                ->bind(':publishUp', $nowDate)
                ->bind(':publishDown', $nowDate);
        }

        // Filter by Date Range or Relative Date
        $dateFiltering =
$this->getState('filter.date_filtering', 'off');
        $dateField     =
$db->escape($this->getState('filter.date_field',
'a.created'));

        switch ($dateFiltering) {
            case 'range':
                $startDateRange =
$this->getState('filter.start_date_range', '');
                $endDateRange   =
$this->getState('filter.end_date_range', '');

                if ($startDateRange || $endDateRange) {
                    $query->where($db->quoteName($dateField) . '
IS NOT NULL');

                    if ($startDateRange) {
                        $query->where($db->quoteName($dateField) .
' >= :startDateRange')
                            ->bind(':startDateRange',
$startDateRange);
                    }

                    if ($endDateRange) {
                        $query->where($db->quoteName($dateField) .
' <= :endDateRange')
                            ->bind(':endDateRange',
$endDateRange);
                    }
                }

                break;

            case 'relative':
                $relativeDate = (int)
$this->getState('filter.relative_date', 0);
                $query->where(
                    $db->quoteName($dateField) . ' IS NOT NULL AND
'
                    . $db->quoteName($dateField) . ' >= ' .
$query->dateAdd($db->quote($nowDate), -1 * $relativeDate,
'DAY')
                );
                break;

            case 'off':
            default:
                break;
        }

        // Process the filter for list views with user-entered filters
        if (\is_object($params) &&
($params->get('filter_field') !== 'hide') &&
($filter = $this->getState('list.filter'))) {
            // Clean filter variable
            $filter      = StringHelper::strtolower($filter);
            $monthFilter = $filter;
            $hitsFilter  = (int) $filter;
            $textFilter  = '%' . $filter . '%';

            switch ($params->get('filter_field')) {
                case 'author':
                    $query->where(
                        'LOWER(CASE WHEN ' .
$db->quoteName('a.created_by_alias') . ' > ' .
$db->quote(' ')
                        . ' THEN ' .
$db->quoteName('a.created_by_alias') . ' ELSE ' .
$db->quoteName('ua.name') . ' END) LIKE :search'
                    )
                        ->bind(':search', $textFilter);
                    break;

                case 'hits':
                    $query->where($db->quoteName('a.hits')
. ' >= :hits')
                        ->bind(':hits', $hitsFilter,
ParameterType::INTEGER);
                    break;

                case 'month':
                    if ($monthFilter != '') {
                        $monthStart = date("Y-m-d",
strtotime($monthFilter)) . ' 00:00:00';
                        $monthEnd   = date("Y-m-t",
strtotime($monthFilter)) . ' 23:59:59';

                        $query->where(
                            [
                                ':monthStart <= CASE WHEN
a.publish_up IS NULL THEN a.created ELSE a.publish_up END',
                                ':monthEnd >= CASE WHEN
a.publish_up IS NULL THEN a.created ELSE a.publish_up END',
                            ]
                        )
                            ->bind(':monthStart', $monthStart)
                            ->bind(':monthEnd', $monthEnd);
                    }
                    break;

                case 'title':
                default:
                    // Default to 'title' if parameter is not
valid
                    $query->where('LOWER(' .
$db->quoteName('a.title') . ') LIKE :search')
                        ->bind(':search', $textFilter);
                    break;
            }
        }

        // Filter by language
        if ($this->getState('filter.language')) {
            $query->whereIn($db->quoteName('a.language'),
[Factory::getApplication()->getLanguage()->getTag(), '*'],
ParameterType::STRING);
        }

        // Filter by a single or group of tags.
        $tagId = $this->getState('filter.tag');

        if (\is_array($tagId) && \count($tagId) === 1) {
            $tagId = current($tagId);
        }

        if (\is_array($tagId)) {
            $tagId = ArrayHelper::toInteger($tagId);

            if ($tagId) {
                $subQuery = $db->getQuery(true)
                    ->select('DISTINCT ' .
$db->quoteName('content_item_id'))
                   
->from($db->quoteName('#__contentitem_tag_map'))
                    ->where(
                        [
                            $db->quoteName('tag_id') . '
IN (' . implode(',', $query->bindArray($tagId)) .
')',
                            $db->quoteName('type_alias') .
' = ' . $db->quote('com_content.article'),
                        ]
                    );

                $query->join(
                    'INNER',
                    '(' . $subQuery . ') AS ' .
$db->quoteName('tagmap'),
                    $db->quoteName('tagmap.content_item_id') .
' = ' . $db->quoteName('a.id')
                );
            }
        } elseif ($tagId = (int) $tagId) {
            $query->join(
                'INNER',
                $db->quoteName('#__contentitem_tag_map',
'tagmap'),
                $db->quoteName('tagmap.content_item_id') .
' = ' . $db->quoteName('a.id')
                    . ' AND ' .
$db->quoteName('tagmap.type_alias') . ' = ' .
$db->quote('com_content.article')
            )
                ->where($db->quoteName('tagmap.tag_id') .
' = :tagId')
                ->bind(':tagId', $tagId,
ParameterType::INTEGER);
        }

        // Add the list ordering clause.
        $query->order(
            $db->escape($this->getState('list.ordering',
'a.ordering')) . ' ' .
$db->escape($this->getState('list.direction',
'ASC'))
        );

        return $query;
    }

    /**
     * Method to get a list of articles.
     *
     * Overridden to inject convert the attribs field into a Registry
object.
     *
     * @return  mixed  An array of objects on success, false on failure.
     *
     * @since   1.6
     */
    public function getItems()
    {
        $items  = parent::getItems();

        $user   = $this->getCurrentUser();
        $userId = $user->get('id');
        $guest  = $user->get('guest');
        $groups = $user->getAuthorisedViewLevels();
        $input  = Factory::getApplication()->getInput();

        // Get the global params
        $globalParams = ComponentHelper::getParams('com_content',
true);

        $taggedItems = [];

        // Convert the parameter fields into objects.
        foreach ($items as $item) {
            $articleParams = new Registry($item->attribs);

            // Unpack readmore and layout params
            $item->alternative_readmore =
$articleParams->get('alternative_readmore');
            $item->layout               =
$articleParams->get('layout');

            $item->params = clone
$this->getState('params');

            /**
             * For blogs, article params override menu item params only if
menu param = 'use_article'
             * Otherwise, menu item params control the layout
             * If menu item is 'use_article' and there is no
article param, use global
             */
            if (
                ($input->getString('layout') ===
'blog') || ($input->getString('view') ===
'featured')
                ||
($this->getState('params')->get('layout_type')
=== 'blog')
            ) {
                // Create an array of just the params set to
'use_article'
                $menuParamsArray =
$this->getState('params')->toArray();
                $articleArray    = [];

                foreach ($menuParamsArray as $key => $value) {
                    if ($value === 'use_article') {
                        // If the article has a value, use it
                        if ($articleParams->get($key) != '') {
                            // Get the value from the article
                            $articleArray[$key] =
$articleParams->get($key);
                        } else {
                            // Otherwise, use the global value
                            $articleArray[$key] =
$globalParams->get($key);
                        }
                    }
                }

                // Merge the selected article params
                if (\count($articleArray) > 0) {
                    $articleParams = new Registry($articleArray);
                    $item->params->merge($articleParams);
                }
            } else {
                // For non-blog layouts, merge all of the article params
                $item->params->merge($articleParams);
            }

            // Get display date
            switch ($item->params->get('list_show_date')) {
                case 'modified':
                    $item->displayDate = $item->modified;
                    break;

                case 'published':
                    $item->displayDate = ($item->publish_up == 0) ?
$item->created : $item->publish_up;
                    break;

                default:
                case 'created':
                    $item->displayDate = $item->created;
                    break;
            }

            /**
             * Compute the asset access permissions.
             * Technically guest could edit an article, but lets not check
that to improve performance a little.
             */
            if (!$guest) {
                $asset = 'com_content.article.' . $item->id;

                // Check general edit permission first.
                if ($user->authorise('core.edit', $asset)) {
                    $item->params->set('access-edit',
true);
                } elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset)) {
                    // Now check if edit.own is available.
                    // Check for a valid user and that they are the owner.
                    if ($userId == $item->created_by) {
                        $item->params->set('access-edit',
true);
                    }
                }
            }

            $access = $this->getState('filter.access');

            if ($access) {
                // If the access filter has been set, we already have only
the articles this user can view.
                $item->params->set('access-view', true);
            } else {
                // If no access filter is set, the layout takes some
responsibility for display of limited information.
                if ($item->catid == 0 || $item->category_access ===
null) {
                    $item->params->set('access-view',
\in_array($item->access, $groups));
                } else {
                    $item->params->set('access-view',
\in_array($item->access, $groups) &&
\in_array($item->category_access, $groups));
                }
            }

            // Some contexts may not use tags data at all, so we allow
callers to disable loading tag data
            if ($this->getState('load_tags',
$item->params->get('show_tags', '1'))) {
                $item->tags             = new TagsHelper();
                $taggedItems[$item->id] = $item;
            }

            if (Associations::isEnabled() &&
$item->params->get('show_associations')) {
                $item->associations =
AssociationHelper::displayAssociations($item->id);
            }
        }

        // Load tags of all items.
        if ($taggedItems) {
            $tagsHelper = new TagsHelper();
            $itemIds    = array_keys($taggedItems);

            foreach
($tagsHelper->getMultipleItemTags('com_content.article',
$itemIds) as $id => $tags) {
                $taggedItems[$id]->tags->itemTags = $tags;
            }
        }

        return $items;
    }

    /**
     * Method to get the starting number of items for the data set.
     *
     * @return  integer  The starting number of items available in the data
set.
     *
     * @since   3.0.1
     */
    public function getStart()
    {
        return $this->getState('list.start');
    }

    /**
     * Count Items by Month
     *
     * @return  mixed  An array of objects on success, false on failure.
     *
     * @since   3.9.0
     */
    public function countItemsByMonth()
    {
        // Create a new query object.
        $db    = $this->getDatabase();
        $query = $db->getQuery(true);

        // Get the list query.
        $listQuery = $this->getListQuery();
        $bounded   = $listQuery->getBounded();

        // Bind list query variables to our new query.
        $keys      = array_keys($bounded);
        $values    = array_column($bounded, 'value');
        $dataTypes = array_column($bounded, 'dataType');

        $query->bind($keys, $values, $dataTypes);

        $query
            ->select(
                'DATE(' .
                $query->concatenate(
                    [
                       
$query->year($db->quoteName('publish_up')),
                        $db->quote('-'),
                       
$query->month($db->quoteName('publish_up')),
                        $db->quote('-01'),
                    ]
                ) . ') AS ' . $db->quoteName('d')
            )
            ->select('COUNT(*) AS ' .
$db->quoteName('c'))
            ->from('(' . $this->getListQuery() . ') AS
' . $db->quoteName('b'))
            ->group($db->quoteName('d'))
            ->order($db->quoteName('d') . '
DESC');

        return $db->setQuery($query)->loadObjectList();
    }
}
PK��[�NQ�wwsrc/Model/ArchiveModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Factory;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Database\ParameterType;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Archive Model
 *
 * @since  1.5
 */
class ArchiveModel extends ArticlesModel
{
    /**
     * Model context string.
     *
     * @var     string
     */
    public $_context = 'com_content.archive';

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @param   string  $ordering   The field to order on.
     * @param   string  $direction  The direction to order on.
     *
     * @return  void
     *
     * @since   1.6
     */
    protected function populateState($ordering = null, $direction = null)
    {
        parent::populateState();

        $app   = Factory::getApplication();
        $input = $app->getInput();

        // Add archive properties
        $params = $this->state->get('params');

        // Filter on archived articles
        $this->setState('filter.published',
ContentComponent::CONDITION_ARCHIVED);

        // Filter on month, year
        $this->setState('filter.month',
$input->getInt('month'));
        $this->setState('filter.year',
$input->getInt('year'));

        // Optional filter text
        $this->setState('list.filter',
$input->getString('filter-search'));

        // Get list limit
        $itemid = $input->get('Itemid', 0, 'int');
        $limit  =
$app->getUserStateFromRequest('com_content.archive.list' .
$itemid . '.limit', 'limit',
$params->get('display_num', 20), 'uint');
        $this->setState('list.limit', $limit);

        // Set the archive ordering
        $articleOrderby   = $params->get('orderby_sec',
'rdate');
        $articleOrderDate = $params->get('order_date');

        // No category ordering
        $secondary = QueryHelper::orderbySecondary($articleOrderby,
$articleOrderDate, $this->getDatabase());

        $this->setState('list.ordering', $secondary . ',
a.created DESC');
        $this->setState('list.direction', '');
    }

    /**
     * Get the main query for retrieving a list of articles subject to the
model state.
     *
     * @return  \Joomla\Database\DatabaseQuery
     *
     * @since   1.6
     */
    protected function getListQuery()
    {
        $params           = $this->state->params;
        $app              = Factory::getApplication();
        $catids           = $app->getInput()->get('catid',
[], 'array');
        $catids           = array_values(array_diff($catids,
['']));

        $articleOrderDate = $params->get('order_date');

        // Create a new query object.
        $db    = $this->getDatabase();
        $query = parent::getListQuery();

        // Add routing for archive
        $query->select(
            [
                $this->getSlugColumn($query, 'a.id',
'a.alias') . ' AS ' .
$db->quoteName('slug'),
                $this->getSlugColumn($query, 'c.id',
'c.alias') . ' AS ' .
$db->quoteName('catslug'),
            ]
        );

        // Filter on month, year
        // First, get the date field
        $queryDate = QueryHelper::getQueryDate($articleOrderDate,
$this->getDatabase());

        if ($month = (int) $this->getState('filter.month')) {
            $query->where($query->month($queryDate) . ' =
:month')
                ->bind(':month', $month,
ParameterType::INTEGER);
        }

        if ($year = (int) $this->getState('filter.year')) {
            $query->where($query->year($queryDate) . ' =
:year')
                ->bind(':year', $year,
ParameterType::INTEGER);
        }

        if (\count($catids) > 0) {
            $query->whereIn($db->quoteName('c.id'),
$catids);
        }

        return $query;
    }

    /**
     * Method to get the archived article list
     *
     * @access public
     * @return array
     */
    public function getData()
    {
        $app = Factory::getApplication();

        // Lets load the content if it doesn't already exist
        if (empty($this->_data)) {
            // Get the page/component configuration
            $params = $app->getParams();

            // Get the pagination request variables
            $limit      = $app->getInput()->get('limit',
$params->get('display_num', 20), 'uint');
            $limitstart =
$app->getInput()->get('limitstart', 0, 'uint');

            $query = $this->_buildQuery();

            $this->_data = $this->_getList($query, $limitstart,
$limit);
        }

        return $this->_data;
    }

    /**
     * Gets the archived articles years
     *
     * @return   array
     *
     * @since    3.6.0
     */
    public function getYears()
    {
        $db        = $this->getDatabase();
        $nowDate   = Factory::getDate()->toSql();
        $query     = $db->getQuery(true);
        $queryDate =
QueryHelper::getQueryDate($this->state->params->get('order_date'),
$db);
        $years     = $query->year($queryDate);

        $query->select('DISTINCT ' . $years)
            ->from($db->quoteName('#__content',
'a'))
            ->where($db->quoteName('a.state') . ' =
' . ContentComponent::CONDITION_ARCHIVED)
            ->extendWhere(
                'AND',
                [
                    $db->quoteName('a.publish_up') . ' IS
NULL',
                    $db->quoteName('a.publish_up') . '
<= :publishUp',
                ],
                'OR'
            )
            ->extendWhere(
                'AND',
                [
                    $db->quoteName('a.publish_down') . '
IS NULL',
                    $db->quoteName('a.publish_down') . '
>= :publishDown',
                ],
                'OR'
            )
            ->bind(':publishUp', $nowDate)
            ->bind(':publishDown', $nowDate)
            ->order('1 ASC');

        $db->setQuery($query);

        return $db->loadColumn();
    }

    /**
     * Generate column expression for slug or catslug.
     *
     * @param   \Joomla\Database\DatabaseQuery  $query  Current query
instance.
     * @param   string                          $id     Column id name.
     * @param   string                          $alias  Column alias name.
     *
     * @return  string
     *
     * @since   4.0.0
     */
    private function getSlugColumn($query, $id, $alias)
    {
        $db = $this->getDatabase();

        return 'CASE WHEN '
            . $query->charLength($db->quoteName($alias),
'!=', '0')
            . ' THEN '
            .
$query->concatenate([$query->castAsChar($db->quoteName($id)),
$db->quoteName($alias)], ':')
            . ' ELSE '
            . $query->castAsChar($id) . ' END';
    }
}
PK��[��(�*�*src/Model/FormModel.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Model;

use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Article Model
 *
 * @since  1.5
 */
class FormModel extends
\Joomla\Component\Content\Administrator\Model\ArticleModel
{
    /**
     * Model typeAlias string. Used for version history.
     *
     * @var        string
     */
    public $typeAlias = 'com_content.article';

    /**
     * Method to auto-populate the model state.
     *
     * Note. Calling getState in this method will result in recursion.
     *
     * @return  void
     *
     * @since   1.6
     */
    protected function populateState()
    {
        $app   = Factory::getApplication();
        $input = $app->getInput();

        // Load the parameters.
        $params = $app->getParams();
        $this->setState('params', $params);

        if ($params && $params->get('enable_category')
== 1 && $params->get('catid')) {
            $catId = $params->get('catid');
        } else {
            $catId = 0;
        }

        // Load state from the request.
        $pk = $input->getInt('a_id');
        $this->setState('article.id', $pk);

        $this->setState('article.catid',
$input->getInt('catid', $catId));

        $return = $input->get('return', '',
'base64');
        $this->setState('return_page',
base64_decode($return));

        $this->setState('layout',
$input->getString('layout'));
    }

    /**
     * Method to get article data.
     *
     * @param   integer  $itemId  The id of the article.
     *
     * @return  mixed  Content item data object on success, false on
failure.
     */
    public function getItem($itemId = null)
    {
        $itemId = (int) (!empty($itemId)) ? $itemId :
$this->getState('article.id');

        // Get a row instance.
        $table = $this->getTable();

        // Attempt to load the row.
        $return = $table->load($itemId);

        // Check for a table object error.
        if ($return === false && $table->getError()) {
            $this->setError($table->getError());

            return false;
        }

        $properties = $table->getProperties(1);
        $value      = ArrayHelper::toObject($properties, CMSObject::class);

        // Convert attrib field to Registry.
        $value->params = new Registry($value->attribs);

        // Compute selected asset permissions.
        $user   = $this->getCurrentUser();
        $userId = $user->get('id');
        $asset  = 'com_content.article.' . $value->id;

        // Check general edit permission first.
        if ($user->authorise('core.edit', $asset)) {
            $value->params->set('access-edit', true);
        } elseif (!empty($userId) &&
$user->authorise('core.edit.own', $asset)) {
            // Now check if edit.own is available.
            // Check for a valid user and that they are the owner.
            if ($userId == $value->created_by) {
                $value->params->set('access-edit', true);
            }
        }

        // Check edit state permission.
        if ($itemId) {
            // Existing item
            $value->params->set('access-change',
$user->authorise('core.edit.state', $asset));
        } else {
            // New item.
            $catId = (int) $this->getState('article.catid');

            if ($catId) {
                $value->params->set('access-change',
$user->authorise('core.edit.state',
'com_content.category.' . $catId));
                $value->catid = $catId;
            } else {
                $value->params->set('access-change',
$user->authorise('core.edit.state', 'com_content'));
            }
        }

        $value->articletext = $value->introtext;

        if (!empty($value->fulltext)) {
            $value->articletext .= '<hr
id="system-readmore">' . $value->fulltext;
        }

        // Convert the metadata field to an array.
        $registry        = new Registry($value->metadata);
        $value->metadata = $registry->toArray();

        if ($itemId) {
            $value->tags = new TagsHelper();
            $value->tags->getTagIds($value->id,
'com_content.article');
            $value->metadata['tags'] = $value->tags;

            $value->featured_up   = null;
            $value->featured_down = null;

            if ($value->featured) {
                // Get featured dates.
                $db    = $this->getDatabase();
                $query = $db->getQuery(true)
                    ->select(
                        [
                            $db->quoteName('featured_up'),
                            $db->quoteName('featured_down'),
                        ]
                    )
                   
->from($db->quoteName('#__content_frontpage'))
                    ->where($db->quoteName('content_id') .
' = :id')
                    ->bind(':id', $value->id,
ParameterType::INTEGER);

                $featured = $db->setQuery($query)->loadObject();

                if ($featured) {
                    $value->featured_up   = $featured->featured_up;
                    $value->featured_down = $featured->featured_down;
                }
            }
        }

        return $value;
    }

    /**
     * Get the return URL.
     *
     * @return  string  The return URL.
     *
     * @since   1.6
     */
    public function getReturnPage()
    {
        return base64_encode($this->getState('return_page',
''));
    }

    /**
     * Method to save the form data.
     *
     * @param   array  $data  The form data.
     *
     * @return  boolean  True on success.
     *
     * @since   3.2
     */
    public function save($data)
    {
        // Associations are not edited in frontend ATM so we have to
inherit them
        if (
            Associations::isEnabled() &&
!empty($data['id'])
            && $associations =
Associations::getAssociations('com_content',
'#__content', 'com_content.item',
$data['id'])
        ) {
            foreach ($associations as $tag => $associated) {
                $associations[$tag] = (int) $associated->id;
            }

            $data['associations'] = $associations;
        }

        if (!Multilanguage::isEnabled()) {
            $data['language'] = '*';
        }

        return parent::save($data);
    }

    /**
     * Method to get the record form.
     *
     * @param   array    $data      Data for the form.
     * @param   boolean  $loadData  True if the form is to load its own
data (default case), false if not.
     *
     * @return  Form|boolean  A Form object on success, false on failure
     *
     * @since   1.6
     */
    public function getForm($data = [], $loadData = true)
    {
        $form = parent::getForm($data, $loadData);

        if (empty($form)) {
            return false;
        }

        $app  = Factory::getApplication();
        $user = $app->getIdentity();

        // On edit article, we get ID of article from article.id state, but
on save, we use data from input
        $id = (int) $this->getState('article.id',
$app->getInput()->getInt('a_id'));

        // Existing record. We can't edit the category in frontend if
not edit.state.
        if ($id > 0 &&
!$user->authorise('core.edit.state',
'com_content.article.' . $id)) {
            $form->setFieldAttribute('catid',
'readonly', 'true');
            $form->setFieldAttribute('catid',
'required', 'false');
            $form->setFieldAttribute('catid',
'filter', 'unset');
        }

        // Prevent messing with article language and category when editing
existing article with associations
        if ($this->getState('article.id') &&
Associations::isEnabled()) {
            $associations =
Associations::getAssociations('com_content',
'#__content', 'com_content.item', $id);

            // Make fields read only
            if (!empty($associations)) {
                $form->setFieldAttribute('language',
'readonly', 'true');
                $form->setFieldAttribute('catid',
'readonly', 'true');
                $form->setFieldAttribute('language',
'filter', 'unset');
                $form->setFieldAttribute('catid',
'filter', 'unset');
            }
        }

        return $form;
    }

    /**
     * Allows preprocessing of the JForm object.
     *
     * @param   Form    $form   The form object
     * @param   array   $data   The data to be merged into the form object
     * @param   string  $group  The plugin group to be executed
     *
     * @return  void
     *
     * @since   3.7.0
     */
    protected function preprocessForm(Form $form, $data, $group =
'content')
    {
        $params = $this->getState()->get('params');

        if ($params && $params->get('enable_category')
== 1 && $params->get('catid')) {
            $form->setFieldAttribute('catid',
'default', $params->get('catid'));
            $form->setFieldAttribute('catid',
'readonly', 'true');

            if (Multilanguage::isEnabled()) {
                $categoryId = (int) $params->get('catid');

                $db    = $this->getDatabase();
                $query = $db->getQuery(true)
                    ->select($db->quoteName('language'))
                    ->from($db->quoteName('#__categories'))
                    ->where($db->quoteName('id') . ' =
:categoryId')
                    ->bind(':categoryId', $categoryId,
ParameterType::INTEGER);
                $db->setQuery($query);

                $result = $db->loadResult();

                if ($result != '*') {
                    $form->setFieldAttribute('language',
'readonly', 'true');
                    $form->setFieldAttribute('language',
'default', $result);
                }
            }
        }

        if (!Multilanguage::isEnabled()) {
            $form->setFieldAttribute('language',
'type', 'hidden');
            $form->setFieldAttribute('language',
'default', '*');
        }

        parent::preprocessForm($form, $data, $group);
    }

    /**
     * Method to get a table object, load it if necessary.
     *
     * @param   string  $name     The table name. Optional.
     * @param   string  $prefix   The class prefix. Optional.
     * @param   array   $options  Configuration array for model. Optional.
     *
     * @return  Table  A Table object
     *
     * @since   4.0.0
     * @throws  \Exception
     */
    public function getTable($name = 'Article', $prefix =
'Administrator', $options = [])
    {
        return parent::getTable($name, $prefix, $options);
    }
}
PK��[�i���0�0$src/Controller/ArticleController.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Controller;

use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Versioning\VersionableControllerTrait;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content article class.
 *
 * @since  1.6.0
 */
class ArticleController extends FormController
{
    use VersionableControllerTrait;

    /**
     * The URL view item variable.
     *
     * @var    string
     * @since  1.6
     */
    protected $view_item = 'form';

    /**
     * The URL view list variable.
     *
     * @var    string
     * @since  1.6
     */
    protected $view_list = 'categories';

    /**
     * The URL edit variable.
     *
     * @var    string
     * @since  3.2
     */
    protected $urlVar = 'a.id';

    /**
     * Method to add a new record.
     *
     * @return  mixed  True if the record can be added, an error object if
not.
     *
     * @since   1.6
     */
    public function add()
    {
        if (!parent::add()) {
            // Redirect to the return page.
            $this->setRedirect($this->getReturnPage());

            return;
        }

        // Redirect to the edit screen.
        $this->setRedirect(
            Route::_(
                'index.php?option=' . $this->option .
'&view=' . $this->view_item . '&a_id=0'
                . $this->getRedirectToItemAppend(),
                false
            )
        );

        return true;
    }

    /**
     * Method override to check if you can add a new record.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  boolean
     *
     * @since   1.6
     */
    protected function allowAdd($data = [])
    {
        $user       = $this->app->getIdentity();
        $categoryId = ArrayHelper::getValue($data, 'catid',
$this->input->getInt('catid'), 'int');
        $allow      = null;

        if ($categoryId) {
            // If the category has been passed in the data or URL check it.
            $allow = $user->authorise('core.create',
'com_content.category.' . $categoryId);
        }

        if ($allow === null) {
            // In the absence of better information, revert to the
component permissions.
            return parent::allowAdd();
        }

        return $allow;
    }

    /**
     * Method override to check if you can edit an existing record.
     *
     * @param   array   $data  An array of input data.
     * @param   string  $key   The name of the key for the primary key;
default is id.
     *
     * @return  boolean
     *
     * @since   1.6
     */
    protected function allowEdit($data = [], $key = 'id')
    {
        $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
        $user     = $this->app->getIdentity();

        // Zero record (id:0), return component edit permission by calling
parent controller method
        if (!$recordId) {
            return parent::allowEdit($data, $key);
        }

        // Check edit on the record asset (explicit or inherited)
        if ($user->authorise('core.edit',
'com_content.article.' . $recordId)) {
            return true;
        }

        // Check edit own on the record asset (explicit or inherited)
        if ($user->authorise('core.edit.own',
'com_content.article.' . $recordId)) {
            // Existing record already has an owner, get it
            $record = $this->getModel()->getItem($recordId);

            if (empty($record)) {
                return false;
            }

            // Grant if current user is owner of the record
            return $user->get('id') == $record->created_by;
        }

        return false;
    }

    /**
     * Method to cancel an edit.
     *
     * @param   string  $key  The name of the primary key of the URL
variable.
     *
     * @return  boolean  True if access level checks pass, false otherwise.
     *
     * @since   1.6
     */
    public function cancel($key = 'a_id')
    {
        $result = parent::cancel($key);

        /** @var SiteApplication $app */
        $app = $this->app;

        // Load the parameters.
        $params = $app->getParams();

        $customCancelRedir = (bool)
$params->get('custom_cancel_redirect');

        if ($customCancelRedir) {
            $cancelMenuitemId = (int)
$params->get('cancel_redirect_menuitem');

            if ($cancelMenuitemId > 0) {
                $item = $app->getMenu()->getItem($cancelMenuitemId);
                $lang = '';

                if (Multilanguage::isEnabled()) {
                    $lang = !\is_null($item) && $item->language
!= '*' ? '&lang=' . $item->language :
'';
                }

                // Redirect to the user specified return page.
                $redirlink = $item->link . $lang .
'&Itemid=' . $cancelMenuitemId;
            } else {
                // Redirect to the same article submission form (clean
form).
                $redirlink = $app->getMenu()->getActive()->link .
'&Itemid=' . $app->getMenu()->getActive()->id;
            }
        } else {
            $menuitemId = (int)
$params->get('redirect_menuitem');

            if ($menuitemId > 0) {
                $lang = '';
                $item = $app->getMenu()->getItem($menuitemId);

                if (Multilanguage::isEnabled()) {
                    $lang = !\is_null($item) && $item->language
!= '*' ? '&lang=' . $item->language :
'';
                }

                // Redirect to the general (redirect_menuitem) user
specified return page.
                $redirlink = $item->link . $lang .
'&Itemid=' . $menuitemId;
            } else {
                // Redirect to the return page.
                $redirlink = $this->getReturnPage();
            }
        }

        $this->setRedirect(Route::_($redirlink, false));

        return $result;
    }

    /**
     * Method to edit an existing record.
     *
     * @param   string  $key     The name of the primary key of the URL
variable.
     * @param   string  $urlVar  The name of the URL variable if different
from the primary key
     * (sometimes required to avoid router collisions).
     *
     * @return  boolean  True if access level check and checkout passes,
false otherwise.
     *
     * @since   1.6
     */
    public function edit($key = null, $urlVar = 'a_id')
    {
        $result = parent::edit($key, $urlVar);

        if (!$result) {
            $this->setRedirect(Route::_($this->getReturnPage(),
false));
        }

        return $result;
    }

    /**
     * Method to get a model object, loading it if required.
     *
     * @param   string  $name    The model name. Optional.
     * @param   string  $prefix  The class prefix. Optional.
     * @param   array   $config  Configuration array for model. Optional.
     *
     * @return  object  The model.
     *
     * @since   1.5
     */
    public function getModel($name = 'Form', $prefix =
'Site', $config = ['ignore_request' => true])
    {
        return parent::getModel($name, $prefix, $config);
    }

    /**
     * Gets the URL arguments to append to an item redirect.
     *
     * @param   integer  $recordId  The primary key id for the item.
     * @param   string   $urlVar    The name of the URL variable for the
id.
     *
     * @return  string  The arguments to append to the redirect URL.
     *
     * @since   1.6
     */
    protected function getRedirectToItemAppend($recordId = null, $urlVar =
'a_id')
    {
        // Need to override the parent method completely.
        $tmpl   = $this->input->get('tmpl');

        $append = '';

        // Setup redirect info.
        if ($tmpl) {
            $append .= '&tmpl=' . $tmpl;
        }

        // @todo This is a bandaid, not a long term solution.
        /**
         * if ($layout)
         * {
         *  $append .= '&layout=' . $layout;
         * }
         */

        $append .= '&layout=edit';

        if ($recordId) {
            $append .= '&' . $urlVar . '=' .
$recordId;
        }

        $itemId = $this->input->getInt('Itemid');
        $return = $this->getReturnPage();
        $catId  = $this->input->getInt('catid');

        if ($itemId) {
            $append .= '&Itemid=' . $itemId;
        }

        if ($catId) {
            $append .= '&catid=' . $catId;
        }

        if ($return) {
            $append .= '&return=' . base64_encode($return);
        }

        return $append;
    }

    /**
     * Get the return URL.
     *
     * If a "return" variable has been passed in the request
     *
     * @return  string  The return URL.
     *
     * @since   1.6
     */
    protected function getReturnPage()
    {
        $return = $this->input->get('return', null,
'base64');

        if (empty($return) || !Uri::isInternal(base64_decode($return))) {
            return Uri::base();
        }

        return base64_decode($return);
    }

    /**
     * Method to save a record.
     *
     * @param   string  $key     The name of the primary key of the URL
variable.
     * @param   string  $urlVar  The name of the URL variable if different
from the primary key (sometimes required to avoid router collisions).
     *
     * @return  boolean  True if successful, false otherwise.
     *
     * @since   1.6
     */
    public function save($key = null, $urlVar = 'a_id')
    {
        $result    = parent::save($key, $urlVar);

        if (\in_array($this->getTask(), ['save2copy',
'apply'], true)) {
            return $result;
        }

        $app       = $this->app;
        $articleId = $app->getInput()->getInt('a_id');

        // Load the parameters.
        $params   = $app->getParams();
        $menuitem = (int) $params->get('redirect_menuitem');

        // Check for redirection after submission when creating a new
article only
        if ($menuitem > 0 && $articleId == 0) {
            $lang = '';

            if (Multilanguage::isEnabled()) {
                $item = $app->getMenu()->getItem($menuitem);
                $lang = !\is_null($item) && $item->language !=
'*' ? '&lang=' . $item->language : '';
            }

            // If ok, redirect to the return page.
            if ($result) {
               
$this->setRedirect(Route::_('index.php?Itemid=' . $menuitem .
$lang, false));
            }
        } elseif ($this->getTask() === 'save2copy') {
            // Redirect to the article page, use the redirect url set from
parent controller
        } else {
            // If ok, redirect to the return page.
            if ($result) {
                $this->setRedirect(Route::_($this->getReturnPage(),
false));
            }
        }

        return $result;
    }

    /**
     * Method to reload a record.
     *
     * @param   string  $key     The name of the primary key of the URL
variable.
     * @param   string  $urlVar  The name of the URL variable if different
from the primary key (sometimes required to avoid router collisions).
     *
     * @return  void
     *
     * @since   3.8.0
     */
    public function reload($key = null, $urlVar = 'a_id')
    {
        parent::reload($key, $urlVar);
    }

    /**
     * Method to save a vote.
     *
     * @return  void
     *
     * @since   1.6
     */
    public function vote()
    {
        // Check for request forgeries.
        $this->checkToken();

        $user_rating = $this->input->getInt('user_rating',
-1);

        if ($user_rating > -1) {
            $url      = $this->input->getString('url',
'');
            $id       = $this->input->getInt('id', 0);
            $viewName = $this->input->getString('view',
$this->default_view);
            $model    = $this->getModel($viewName);

            // Don't redirect to an external URL.
            if (!Uri::isInternal($url)) {
                $url = Route::_('index.php');
            }

            if ($model->storeVote($id, $user_rating)) {
                $this->setRedirect($url,
Text::_('COM_CONTENT_ARTICLE_VOTE_SUCCESS'));
            } else {
                $this->setRedirect($url,
Text::_('COM_CONTENT_ARTICLE_VOTE_FAILURE'));
            }
        }
    }
}
PK��[����EE$src/Controller/DisplayController.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\Controller;

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content Component Controller
 *
 * @since  1.5
 */
class DisplayController extends \Joomla\CMS\MVC\Controller\BaseController
{
    /**
     * @param   array                         $config   An optional
associative array of configuration settings.
     *                                                  Recognized key
values include 'name', 'default_task',
'model_path', and
     *                                                 
'view_path' (this list is not meant to be comprehensive).
     * @param   MVCFactoryInterface|null      $factory  The factory.
     * @param   CMSApplication|null           $app      The Application for
the dispatcher
     * @param   \Joomla\CMS\Input\Input|null  $input    The Input object
for the request
     *
     * @since   3.0.1
     */
    public function __construct($config = [], MVCFactoryInterface $factory
= null, $app = null, $input = null)
    {
        $this->input = Factory::getApplication()->getInput();

        // Article frontpage Editor pagebreak proxying:
        if ($this->input->get('view') ===
'article' && $this->input->get('layout')
=== 'pagebreak') {
            $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
        } elseif ($this->input->get('view') ===
'articles' && $this->input->get('layout')
=== 'modal') {
            // Article frontpage Editor article proxying:
            $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
        }

        parent::__construct($config, $factory, $app, $input);
    }

    /**
     * Method to display a view.
     *
     * @param   boolean  $cachable   If true, the view output will be
cached.
     * @param   boolean  $urlparams  An array of safe URL parameters and
their variable types.
     *                   @see       
\Joomla\CMS\Filter\InputFilter::clean() for valid values.
     *
     * @return  DisplayController  This object to support chaining.
     *
     * @since   1.5
     */
    public function display($cachable = false, $urlparams = false)
    {
        $cachable = true;

        /**
         * Set the default view name and format from the Request.
         * Note we are using a_id to avoid collisions with the router and
the return page.
         * Frontend is a bit messier than the backend.
         */
        $id    = $this->input->getInt('a_id');
        $vName = $this->input->getCmd('view',
'categories');
        $this->input->set('view', $vName);

        $user = $this->app->getIdentity();

        if (
            $user->get('id')
            || ($this->input->getMethod() === 'POST'
            && (($vName === 'category' &&
$this->input->get('layout') !== 'blog') || $vName
=== 'archive'))
        ) {
            $cachable = false;
        }

        $safeurlparams = [
            'catid'            => 'INT',
            'id'               => 'INT',
            'cid'              => 'ARRAY',
            'year'             => 'INT',
            'month'            => 'INT',
            'limit'            => 'UINT',
            'limitstart'       => 'UINT',
            'showall'          => 'INT',
            'return'           => 'BASE64',
            'filter'           => 'STRING',
            'filter_order'     => 'CMD',
            'filter_order_Dir' => 'CMD',
            'filter-search'    => 'STRING',
            'print'            => 'BOOLEAN',
            'lang'             => 'CMD',
            'Itemid'           => 'INT', ];

        // Check for edit form.
        if ($vName === 'form' &&
!$this->checkEditId('com_content.edit.article', $id)) {
            // Somehow the person just went to the form - we don't
allow that.
            throw new
\Exception(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID',
$id), 403);
        }

        if ($vName === 'article') {
            // Get/Create the model
            if ($model = $this->getModel($vName)) {
                if
(ComponentHelper::getParams('com_content')->get('record_hits',
1) == 1) {
                    $model->hit();
                }
            }
        }

        parent::display($cachable, $safeurlparams);

        return $this;
    }
}
PK��[��y��
�
src/View/Category/FeedView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Category;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\CategoryFeedView;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class FeedView extends CategoryFeedView
{
    /**
     * @var    string  The name of the view to link individual items to
     *
     * @since  3.2
     */
    protected $viewName = 'article';

    /**
     * Method to reconcile non-standard names from components to usage in
this class.
     * Typically overridden in the component feed view class.
     *
     * @param   object  $item  The item for a feed, an element of the
$items array.
     *
     * @return  void
     *
     * @since   3.2
     */
    protected function reconcileNames($item)
    {
        // Get description, intro_image, author and date
        $app               = Factory::getApplication();
        $params            = $app->getParams();
        $item->description = '';
        $obj               = json_decode($item->images);

        if (!empty($obj->image_intro)) {
            $item->description = '<p>' .
HTMLHelper::_('image', $obj->image_intro,
$obj->image_intro_alt) . '</p>';
        }

        $item->description .= ($params->get('feed_summary',
0) ? $item->introtext . $item->fulltext : $item->introtext);

        // Add readmore link to description if introtext is shown,
show_readmore is true and fulltext exists
        if (!$item->params->get('feed_summary', 0)
&& $item->params->get('feed_show_readmore', 0)
&& $item->fulltext) {
            // Compute the article slug
            $item->slug = $item->alias ? ($item->id .
':' . $item->alias) : $item->id;

            // URL link to article
            $link = Route::_(
                RouteHelper::getArticleRoute($item->slug,
$item->catid, $item->language),
                true,
                $app->get('force_ssl') == 2 ? Route::TLS_FORCE
: Route::TLS_IGNORE,
                true
            );

            $item->description .= '<p
class="feed-readmore"><a target="_blank"
href="' . $link . '" rel="noopener">'
                . Text::_('COM_CONTENT_FEED_READMORE') .
'</a></p>';
        }

        $item->author = $item->created_by_alias ?: $item->author;
    }
}
PK��[DO����src/View/Category/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Category;

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\CategoryView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class HtmlView extends CategoryView
{
    /**
     * @var    array  Array of leading items for blog display
     * @since  3.2
     */
    protected $lead_items = [];

    /**
     * @var    array  Array of intro items for blog display
     * @since  3.2
     */
    protected $intro_items = [];

    /**
     * @var    array  Array of links in blog display
     * @since  3.2
     */
    protected $link_items = [];

    /**
     * @var    string  The name of the extension for the category
     * @since  3.2
     */
    protected $extension = 'com_content';

    /**
     * @var    string  Default title to use for page title
     * @since  3.2
     */
    protected $defaultPageTitle = 'JGLOBAL_ARTICLES';

    /**
     * @var    string  The name of the view to link individual items to
     * @since  3.2
     */
    protected $viewName = 'article';

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void
     */
    public function display($tpl = null)
    {
        parent::commonCategoryDisplay();

        // Flag indicates to not add limitstart=0 to URL
        $this->pagination->hideEmptyLimitstart = true;

        // Prepare the data
        // Get the metrics for the structural page layout.
        $params     = $this->params;
        $numLeading = $params->def('num_leading_articles', 1);
        $numIntro   = $params->def('num_intro_articles', 4);
        $numLinks   = $params->def('num_links', 4);
        $this->vote = PluginHelper::isEnabled('content',
'vote');

        PluginHelper::importPlugin('content');

        $app     = Factory::getApplication();

        // Compute the article slugs and prepare introtext (runs content
plugins).
        foreach ($this->items as $item) {
            $item->slug = $item->alias ? ($item->id .
':' . $item->alias) : $item->id;

            // No link for ROOT category
            if ($item->parent_alias === 'root') {
                $item->parent_id = null;
            }

            $item->event   = new \stdClass();

            // Old plugins: Ensure that text property is available
            if (!isset($item->text)) {
                $item->text = $item->introtext;
            }

            $app->triggerEvent('onContentPrepare',
['com_content.category', &$item, &$item->params, 0]);

            // Old plugins: Use processed text as introtext
            $item->introtext = $item->text;

            $results                        =
$app->triggerEvent('onContentAfterTitle',
['com_content.category', &$item, &$item->params, 0]);
            $item->event->afterDisplayTitle =
trim(implode("\n", $results));

            $results                           =
$app->triggerEvent('onContentBeforeDisplay',
['com_content.category', &$item, &$item->params, 0]);
            $item->event->beforeDisplayContent =
trim(implode("\n", $results));

            $results                          =
$app->triggerEvent('onContentAfterDisplay',
['com_content.category', &$item, &$item->params, 0]);
            $item->event->afterDisplayContent =
trim(implode("\n", $results));
        }

        // For blog layouts, preprocess the breakdown of leading, intro and
linked articles.
        // This makes it much easier for the designer to just interrogate
the arrays.
        if ($params->get('layout_type') === 'blog'
|| $this->getLayout() === 'blog') {
            foreach ($this->items as $i => $item) {
                if ($i < $numLeading) {
                    $this->lead_items[] = $item;
                } elseif ($i >= $numLeading && $i <
$numLeading + $numIntro) {
                    $this->intro_items[] = $item;
                } elseif ($i < $numLeading + $numIntro + $numLinks) {
                    $this->link_items[] = $item;
                }
            }
        }

        // Because the application sets a default page title,
        // we need to get it from the menu item itself
        $active = $app->getMenu()->getActive();

        if ($this->menuItemMatchCategory) {
            $this->params->def('page_heading',
$this->params->get('page_title', $active->title));
            $title = $this->params->get('page_title',
$active->title);
        } else {
            $this->params->def('page_heading',
$this->category->title);
            $title = $this->category->title;
            $this->params->set('page_title', $title);
        }

        if (empty($title)) {
            $title = $this->category->title;
        }

        $this->setDocumentTitle($title);

        if ($this->category->metadesc) {
           
$this->getDocument()->setDescription($this->category->metadesc);
        } elseif
($this->params->get('menu-meta_description')) {
           
$this->getDocument()->setDescription($this->params->get('menu-meta_description'));
        }

        if ($this->params->get('robots')) {
            $this->getDocument()->setMetaData('robots',
$this->params->get('robots'));
        }

        if (!\is_object($this->category->metadata)) {
            $this->category->metadata = new
Registry($this->category->metadata);
        }

        if (($app->get('MetaAuthor') == '1')
&& $this->category->get('author', '')) {
            $this->getDocument()->setMetaData('author',
$this->category->get('author', ''));
        }

        $mdata = $this->category->metadata->toArray();

        foreach ($mdata as $k => $v) {
            if ($v) {
                $this->getDocument()->setMetaData($k, $v);
            }
        }

        parent::display($tpl);
    }

    /**
     * Prepares the document
     *
     * @return  void
     */
    protected function prepareDocument()
    {
        parent::prepareDocument();

        parent::addFeed();

        if ($this->menuItemMatchCategory) {
            // If the active menu item is linked directly to the category
being displayed, no further process is needed
            return;
        }

        // Get ID of the category from active menu item
        $menu = $this->menu;

        if (
            $menu && $menu->component == 'com_content'
&& isset($menu->query['view'])
            && \in_array($menu->query['view'],
['categories', 'category'])
        ) {
            $id = $menu->query['id'];
        } else {
            $id = 0;
        }

        $path     = [['title' => $this->category->title,
'link' => '']];
        $category = $this->category->getParent();

        while ($category !== null && $category->id !==
'root' && $category->id != $id) {
            $path[]   = ['title' => $category->title,
'link' => RouteHelper::getCategoryRoute($category->id,
$category->language)];
            $category = $category->getParent();
        }

        $path = array_reverse($path);

        foreach ($path as $item) {
            $this->pathway->addItem($item['title'],
$item['link']);
        }
    }
}
PK��[:c�P22src/View/Article/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Article;

use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Event\Content;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML Article View class for the Content component
 *
 * @since  1.5
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The article object
     *
     * @var  \stdClass
     */
    protected $item;

    /**
     * The page parameters
     *
     * @var    \Joomla\Registry\Registry|null
     *
     * @since  4.0.0
     */
    protected $params = null;

    /**
     * Should the print button be displayed or not?
     *
     * @var   boolean
     */
    protected $print = false;

    /**
     * The model state
     *
     * @var   \Joomla\Registry\Registry
     */
    protected $state;

    /**
     * The user object
     *
     * @var   \Joomla\CMS\User\User|null
     */
    protected $user = null;

    /**
     * The page class suffix
     *
     * @var    string
     *
     * @since  4.0.0
     */
    protected $pageclass_sfx = '';

    /**
     * The flag to mark if the active menu item is linked to the being
displayed article
     *
     * @var boolean
     */
    protected $menuItemMatchArticle = false;

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void
     */
    public function display($tpl = null)
    {
        if ($this->getLayout() == 'pagebreak') {
            parent::display($tpl);

            return;
        }

        $app  = Factory::getApplication();
        $user = $this->getCurrentUser();

        $this->item  = $this->get('Item');
        $this->print =
$app->getInput()->getBool('print', false);
        $this->state = $this->get('State');
        $this->user  = $user;

        // Check for errors.
        if (\count($errors = $this->get('Errors'))) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        // Create a shortcut for $item.
        $item            = $this->item;
        $item->tagLayout = new
FileLayout('joomla.content.tags');

        // Add router helpers.
        $item->slug = $item->alias ? ($item->id . ':' .
$item->alias) : $item->id;

        // No link for ROOT category
        if ($item->parent_alias === 'root') {
            $item->parent_id = null;
        }

        // @todo Change based on shownoauth
        $item->readmore_link =
Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid,
$item->language));

        // Merge article params. If this is single-article view, menu
params override article params
        // Otherwise, article params override menu item params
        $this->params = $this->state->get('params');
        $active       = $app->getMenu()->getActive();
        $temp         = clone $this->params;

        // Check to see which parameters should take priority. If the
active menu item link to the current article, then
        // the menu item params take priority
        if (
            $active
            && $active->component == 'com_content'
            && isset($active->query['view'],
$active->query['id'])
            && $active->query['view'] ==
'article'
            && $active->query['id'] == $item->id
        ) {
            $this->menuItemMatchArticle = true;

            // Load layout from active query (in case it is an alternative
menu item)
            if (isset($active->query['layout'])) {
                $this->setLayout($active->query['layout']);
            } elseif ($layout =
$item->params->get('article_layout')) {
                // Check for alternative layout of article
                $this->setLayout($layout);
            }

            // $item->params are the article params, $temp are the menu
item params
            // Merge so that the menu item params take priority
            $item->params->merge($temp);
        } else {
            // The active menu item is not linked to this article, so the
article params take priority here
            // Merge the menu item params with the article params so that
the article params take priority
            $temp->merge($item->params);
            $item->params = $temp;

            // Check for alternative layouts (since we are not in a
single-article menu item)
            // Single-article menu item layout takes priority over alt
layout for an article
            if ($layout =
$item->params->get('article_layout')) {
                $this->setLayout($layout);
            }
        }

        $offset = (int) $this->state->get('list.offset');

        // Check the view access to the article (the model has already
computed the values).
        if ($item->params->get('access-view') == false
&& ($item->params->get('show_noauth',
'0') == '0')) {
           
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'),
'error');
            $app->setHeader('status', 403, true);

            return;
        }

        /**
         * Check for no 'access-view' and empty fulltext,
         * - Redirect guest users to login
         * - Deny access to logged users with 403 code
         * NOTE: we do not recheck for no access-view + show_noauth
disabled ... since it was checked above
         */
        if ($item->params->get('access-view') == false
&& !\strlen($item->fulltext)) {
            if ($this->user->get('guest')) {
                $return                = base64_encode(Uri::getInstance());
                $login_url_with_return =
Route::_('index.php?option=com_users&view=login&return='
. $return);
               
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'),
'notice');
                $app->redirect($login_url_with_return, 403);
            } else {
               
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'),
'error');
                $app->setHeader('status', 403, true);

                return;
            }
        }

        /**
         * NOTE: The following code (usually) sets the text to contain the
fulltext, but it is the
         * responsibility of the layout to check 'access-view'
and only use "introtext" for guests
         */
        if ($item->params->get('show_intro', '1')
== '1') {
            $item->text = $item->introtext . ' ' .
$item->fulltext;
        } elseif ($item->fulltext) {
            $item->text = $item->fulltext;
        } else {
            $item->text = $item->introtext;
        }

        $item->tags = new TagsHelper();
        $item->tags->getItemTags('com_content.article',
$this->item->id);

        if (Associations::isEnabled() &&
$item->params->get('show_associations')) {
            $item->associations =
AssociationHelper::displayAssociations($item->id);
        }

        $dispatcher = $this->getDispatcher();

        // Process the content plugins.
        PluginHelper::importPlugin('content', null, true,
$dispatcher);

        $contentEventArguments = [
            'context' => 'com_content.article',
            'subject' => $item,
            'params'  => $item->params,
            'page'    => $offset,
        ];

        $dispatcher->dispatch('onContentPrepare', new
Content\ContentPrepareEvent('onContentPrepare',
$contentEventArguments));

        // Extra content from events
        $item->event   = new \stdClass();
        $contentEvents = [
            'afterDisplayTitle'    => new
Content\AfterTitleEvent('onContentAfterTitle',
$contentEventArguments),
            'beforeDisplayContent' => new
Content\BeforeDisplayEvent('onContentBeforeDisplay',
$contentEventArguments),
            'afterDisplayContent'  => new
Content\AfterDisplayEvent('onContentAfterDisplay',
$contentEventArguments),
        ];

        foreach ($contentEvents as $resultKey => $event) {
            $results = $dispatcher->dispatch($event->getName(),
$event)->getArgument('result', []);

            $item->event->{$resultKey} = $results ?
trim(implode("\n", $results)) : '';
        }

        // Escape strings for HTML output
        $this->pageclass_sfx =
htmlspecialchars($this->item->params->get('pageclass_sfx',
''));

        $this->_prepareDocument();

        parent::display($tpl);
    }

    /**
     * Prepares the document.
     *
     * @return  void
     */
    protected function _prepareDocument()
    {
        $app     = Factory::getApplication();
        $pathway = $app->getPathway();

        /**
         * Because the application sets a default page title,
         * we need to get it from the menu item itself
         */
        $menu = $app->getMenu()->getActive();

        if ($menu) {
            $this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
        } else {
            $this->params->def('page_heading',
Text::_('JGLOBAL_ARTICLES'));
        }

        // If the menu item is not linked to this article
        if (!$this->menuItemMatchArticle) {
            // If a browser page title is defined, use that, then fall back
to the article title if set, then fall back to the page_title option
            $title =
$this->item->params->get('article_page_title',
$this->item->title);

            // Get ID of the category from active menu item
            if (
                $menu && $menu->component ==
'com_content' && isset($menu->query['view'])
                && \in_array($menu->query['view'],
['categories', 'category'])
            ) {
                $id = $menu->query['id'];
            } else {
                $id = 0;
            }

            $path     = [['title' => $this->item->title,
'link' => '']];
            $category =
Categories::getInstance('Content')->get($this->item->catid);

            while ($category !== null && $category->id != $id
&& $category->id !== 'root') {
                $path[]   = ['title' => $category->title,
'link' => RouteHelper::getCategoryRoute($category->id,
$category->language)];
                $category = $category->getParent();
            }

            $path = array_reverse($path);

            foreach ($path as $item) {
                $pathway->addItem($item['title'],
$item['link']);
            }
        } else {
            /**
             * This case the menu item links directly to the article,
browser will be determined by following
             * order:
             * 1. Browser page title set from menu item itself
             * 2. Browser page title set for the article
             * 3. Article title
             */
            $menuItemParams = $menu->getParams();
            $title          = $menuItemParams->get(
                'page_title',
               
$this->item->params->get('article_page_title',
$this->item->title)
            );
        }

        $this->setDocumentTitle($title);

        if ($this->item->metadesc) {
           
$this->getDocument()->setDescription($this->item->metadesc);
        } elseif
($this->params->get('menu-meta_description')) {
           
$this->getDocument()->setDescription($this->params->get('menu-meta_description'));
        }

        if ($this->params->get('robots')) {
            $this->getDocument()->setMetaData('robots',
$this->params->get('robots'));
        }

        if ($app->get('MetaAuthor') == '1') {
            $author = $this->item->created_by_alias ?:
$this->item->author;
            $this->getDocument()->setMetaData('author',
$author);
        }

        $mdata = $this->item->metadata->toArray();

        foreach ($mdata as $k => $v) {
            if ($v) {
                $this->getDocument()->setMetaData($k, $v);
            }
        }

        // If there is a pagebreak heading or title, add it to the page
title
        if (!empty($this->item->page_title)) {
            $this->item->title .= ' - ' .
$this->item->page_title;
            $this->setDocumentTitle(
                $this->item->page_title . ' - ' .
Text::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM',
$this->state->get('list.offset') + 1)
            );
        }

        if ($this->print) {
            $this->getDocument()->setMetaData('robots',
'noindex, nofollow');
        }
    }
}
PK��[�N0i��src/View/Archive/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Archive;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML View class for the Content component
 *
 * @since  1.5
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The model state
     *
     * @var   \Joomla\Registry\Registry
     */
    protected $state = null;

    /**
     * An array containing archived articles
     *
     * @var   \stdClass[]
     */
    protected $items = [];

    /**
     * The pagination object
     *
     * @var   \Joomla\CMS\Pagination\Pagination|null
     */
    protected $pagination = null;

    /**
     * The years that are available to filter on.
     *
     * @var   array
     *
     * @since 3.6.0
     */
    protected $years = [];

    /**
     * Object containing the year, month and limit field to be displayed
     *
     * @var    \stdClass|null
     *
     * @since  4.0.0
     */
    protected $form = null;

    /**
     * The page parameters
     *
     * @var    \Joomla\Registry\Registry|null
     *
     * @since  4.0.0
     */
    protected $params = null;

    /**
     * The search query used on any archived articles (note this may not be
displayed depending on the value of the
     * filter_field component parameter)
     *
     * @var    string
     *
     * @since  4.0.0
     */
    protected $filter = '';

    /**
     * The user object
     *
     * @var    \Joomla\CMS\User\User
     *
     * @since  4.0.0
     */
    protected $user = null;

    /**
     * The page class suffix
     *
     * @var    string
     *
     * @since  4.0.0
     */
    protected $pageclass_sfx = '';

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void
     *
     * @throws  GenericDataException
     */
    public function display($tpl = null)
    {
        $user       = $this->getCurrentUser();
        $state      = $this->get('State');
        $items      = $this->get('Items');
        $pagination = $this->get('Pagination');

        if ($errors = $this->getModel()->getErrors()) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        // Flag indicates to not add limitstart=0 to URL
        $pagination->hideEmptyLimitstart = true;

        // Get the page/component configuration
        $params = &$state->params;

        PluginHelper::importPlugin('content');

        foreach ($items as $item) {
            $item->slug = $item->alias ? ($item->id .
':' . $item->alias) : $item->id;

            // No link for ROOT category
            if ($item->parent_alias === 'root') {
                $item->parent_id = null;
            }

            $item->event = new \stdClass();

            // Old plugins: Ensure that text property is available
            if (!isset($item->text)) {
                $item->text = $item->introtext;
            }

           
Factory::getApplication()->triggerEvent('onContentPrepare',
['com_content.archive', &$item, &$item->params, 0]);

            // Old plugins: Use processed text as introtext
            $item->introtext = $item->text;

            $results                        =
Factory::getApplication()->triggerEvent('onContentAfterTitle',
['com_content.archive', &$item, &$item->params, 0]);
            $item->event->afterDisplayTitle =
trim(implode("\n", $results));

            $results                           =
Factory::getApplication()->triggerEvent('onContentBeforeDisplay',
['com_content.archive', &$item, &$item->params, 0]);
            $item->event->beforeDisplayContent =
trim(implode("\n", $results));

            $results                          =
Factory::getApplication()->triggerEvent('onContentAfterDisplay',
['com_content.archive', &$item, &$item->params, 0]);
            $item->event->afterDisplayContent =
trim(implode("\n", $results));
        }

        $form = new \stdClass();

        // Month Field
        $months = [
            ''   => Text::_('COM_CONTENT_MONTH'),
            '1'  => Text::_('JANUARY_SHORT'),
            '2'  => Text::_('FEBRUARY_SHORT'),
            '3'  => Text::_('MARCH_SHORT'),
            '4'  => Text::_('APRIL_SHORT'),
            '5'  => Text::_('MAY_SHORT'),
            '6'  => Text::_('JUNE_SHORT'),
            '7'  => Text::_('JULY_SHORT'),
            '8'  => Text::_('AUGUST_SHORT'),
            '9'  => Text::_('SEPTEMBER_SHORT'),
            '10' => Text::_('OCTOBER_SHORT'),
            '11' => Text::_('NOVEMBER_SHORT'),
            '12' => Text::_('DECEMBER_SHORT'),
        ];
        $form->monthField = HTMLHelper::_(
            'select.genericlist',
            $months,
            'month',
            [
                'list.attr'   =>
'class="form-select"',
                'list.select' =>
$state->get('filter.month'),
                'option.key'  => null,
            ]
        );

        // Year Field
        $this->years = $this->getModel()->getYears();
        $years       = [];
        $years[]     = HTMLHelper::_('select.option', null,
Text::_('JYEAR'));

        for ($i = 0, $iMax = \count($this->years); $i < $iMax; $i++)
{
            $years[] = HTMLHelper::_('select.option',
$this->years[$i], $this->years[$i]);
        }

        $form->yearField = HTMLHelper::_(
            'select.genericlist',
            $years,
            'year',
            ['list.attr' =>
'class="form-select"', 'list.select' =>
$state->get('filter.year')]
        );
        $form->limitField = $pagination->getLimitBox();

        // Escape strings for HTML output
        $this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx', ''));

        $this->filter     = $state->get('list.filter');
        $this->form       = &$form;
        $this->items      = &$items;
        $this->params     = &$params;
        $this->user       = &$user;
        $this->pagination = &$pagination;
        $this->pagination->setAdditionalUrlParam('month',
$state->get('filter.month'));
        $this->pagination->setAdditionalUrlParam('year',
$state->get('filter.year'));

        $this->_prepareDocument();

        parent::display($tpl);
    }

    /**
     * Prepares the document
     *
     * @return  void
     */
    protected function _prepareDocument()
    {
        // Because the application sets a default page title,
        // we need to get it from the menu item itself
        $menu = Factory::getApplication()->getMenu()->getActive();

        if ($menu) {
            $this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
        } else {
            $this->params->def('page_heading',
Text::_('JGLOBAL_ARTICLES'));
        }

       
$this->setDocumentTitle($this->params->get('page_title',
''));

        if ($this->params->get('menu-meta_description')) {
           
$this->getDocument()->setDescription($this->params->get('menu-meta_description'));
        }

        if ($this->params->get('robots')) {
            $this->getDocument()->setMetaData('robots',
$this->params->get('robots'));
        }
    }
}
PK��[�ؖ���src/View/Featured/FeedView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Featured;

use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Document\Feed\FeedItem;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\AbstractView;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Frontpage View class
 *
 * @since  1.5
 */
class FeedView extends AbstractView
{
    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void
     */
    public function display($tpl = null)
    {
        // Parameters
        $app       = Factory::getApplication();
        $params    = $app->getParams();
        $feedEmail = $app->get('feed_email',
'none');
        $siteEmail = $app->get('mailfrom');

        $this->getDocument()->link =
Route::_('index.php?option=com_content&view=featured');

        // Get some data from the model
        $app->getInput()->set('limit',
$app->get('feed_limit'));
        $categories = Categories::getInstance('Content');
        $rows       = $this->get('Items');

        foreach ($rows as $row) {
            // Strip html from feed item title
            $title = htmlspecialchars($row->title, ENT_QUOTES,
'UTF-8');
            $title = html_entity_decode($title, ENT_COMPAT,
'UTF-8');

            // Compute the article slug
            $row->slug = $row->alias ? ($row->id . ':' .
$row->alias) : $row->id;

            // URL link to article
            $link = RouteHelper::getArticleRoute($row->slug,
$row->catid, $row->language);

            $description = '';
            $obj         = json_decode($row->images);

            if (!empty($obj->image_intro)) {
                $description = '<p>' .
HTMLHelper::_('image', $obj->image_intro,
$obj->image_intro_alt) . '</p>';
            }

            $description .= ($params->get('feed_summary', 0) ?
$row->introtext . $row->fulltext : $row->introtext);
            $author      = $row->created_by_alias ?: $row->author;

            // Load individual item creator class
            $item           = new FeedItem();
            $item->title    = $title;
            $item->link     = Route::_($link);
            $item->date     = $row->publish_up;
            $item->category = [];

            // All featured articles are categorized as
"Featured"
            $item->category[] = Text::_('JFEATURED');

            for ($item_category = $categories->get($row->catid);
$item_category !== null; $item_category = $item_category->getParent()) {
                // Only add non-root categories
                if ($item_category->id > 1) {
                    $item->category[] = $item_category->title;
                }
            }

            $item->author = $author;

            if ($feedEmail === 'site') {
                $item->authorEmail = $siteEmail;
            } elseif ($feedEmail === 'author') {
                $item->authorEmail = $row->author_email;
            }

            // Add readmore link to description if introtext is shown,
show_readmore is true and fulltext exists
            if (!$params->get('feed_summary', 0) &&
$params->get('feed_show_readmore', 0) &&
$row->fulltext) {
                $link = Route::_($link, true,
$app->get('force_ssl') == 2 ? Route::TLS_FORCE :
Route::TLS_IGNORE, true);
                $description .= '<p
class="feed-readmore"><a target="_blank"
href="' . $link . '" rel="noopener">'
                    . Text::_('COM_CONTENT_FEED_READMORE') .
'</a></p>';
            }

            // Load item description and add div
            $item->description = '<div
class="feed-description">' . $description .
'</div>';

            // Loads item info into rss array
            $this->getDocument()->addItem($item);
        }
    }
}
PK��[�����src/View/Featured/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Featured;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Frontpage View class
 *
 * @since  1.5
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The model state
     *
     * @var  \Joomla\Registry\Registry
     */
    protected $state = null;

    /**
     * The featured articles array
     *
     * @var  \stdClass[]
     */
    protected $items = null;

    /**
     * The pagination object.
     *
     * @var  \Joomla\CMS\Pagination\Pagination
     */
    protected $pagination = null;

    /**
     * The featured articles to be displayed as lead items.
     *
     * @var  \stdClass[]
     */
    protected $lead_items = [];

    /**
     * The featured articles to be displayed as intro items.
     *
     * @var  \stdClass[]
     */
    protected $intro_items = [];

    /**
     * The featured articles to be displayed as link items.
     *
     * @var  \stdClass[]
     */
    protected $link_items = [];

    /**
     * @var    \Joomla\Database\DatabaseDriver
     *
     * @since  3.6.3
     *
     * @deprecated  4.3 will be removed in 6.0
     *              Will be removed without replacement use database from
the container instead
     *              Example:
Factory::getContainer()->get(DatabaseInterface::class);
     */
    protected $db;

    /**
     * The user object
     *
     * @var \Joomla\CMS\User\User|null
     */
    protected $user = null;

    /**
     * The page class suffix
     *
     * @var    string
     *
     * @since  4.0.0
     */
    protected $pageclass_sfx = '';

    /**
     * The page parameters
     *
     * @var    \Joomla\Registry\Registry|null
     *
     * @since  4.0.0
     */
    protected $params = null;

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void
     */
    public function display($tpl = null)
    {
        $user = $this->getCurrentUser();

        $state      = $this->get('State');
        $items      = $this->get('Items');
        $pagination = $this->get('Pagination');

        // Flag indicates to not add limitstart=0 to URL
        $pagination->hideEmptyLimitstart = true;

        // Check for errors.
        if (\count($errors = $this->get('Errors'))) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        /** @var \Joomla\Registry\Registry $params */
        $params = &$state->params;

        // PREPARE THE DATA

        // Get the metrics for the structural page layout.
        $numLeading = (int)
$params->def('num_leading_articles', 1);
        $numIntro   = (int) $params->def('num_intro_articles',
4);

        PluginHelper::importPlugin('content');

        // Compute the article slugs and prepare introtext (runs content
plugins).
        foreach ($items as &$item) {
            $item->slug = $item->alias ? ($item->id .
':' . $item->alias) : $item->id;

            // No link for ROOT category
            if ($item->parent_alias === 'root') {
                $item->parent_id = null;
            }

            $item->event = new \stdClass();

            // Old plugins: Ensure that text property is available
            if (!isset($item->text)) {
                $item->text = $item->introtext;
            }

           
Factory::getApplication()->triggerEvent('onContentPrepare',
['com_content.featured', &$item, &$item->params, 0]);

            // Old plugins: Use processed text as introtext
            $item->introtext = $item->text;

            $results                        =
Factory::getApplication()->triggerEvent('onContentAfterTitle',
['com_content.featured', &$item, &$item->params, 0]);
            $item->event->afterDisplayTitle =
trim(implode("\n", $results));

            $results                           =
Factory::getApplication()->triggerEvent('onContentBeforeDisplay',
['com_content.featured', &$item, &$item->params, 0]);
            $item->event->beforeDisplayContent =
trim(implode("\n", $results));

            $results                          =
Factory::getApplication()->triggerEvent('onContentAfterDisplay',
['com_content.featured', &$item, &$item->params, 0]);
            $item->event->afterDisplayContent =
trim(implode("\n", $results));
        }

        // Preprocess the breakdown of leading, intro and linked articles.
        // This makes it much easier for the designer to just integrate the
arrays.
        $max = \count($items);

        // The first group is the leading articles.
        $limit = $numLeading;

        for ($i = 0; $i < $limit && $i < $max; $i++) {
            $this->lead_items[$i] = &$items[$i];
        }

        // The second group is the intro articles.
        $limit = $numLeading + $numIntro;

        // Order articles across, then down (or single column mode)
        for ($i = $numLeading; $i < $limit && $i < $max;
$i++) {
            $this->intro_items[$i] = &$items[$i];
        }

        // The remainder are the links.
        for ($i = $numLeading + $numIntro; $i < $max; $i++) {
            $this->link_items[$i] = &$items[$i];
        }

        // Escape strings for HTML output
        $this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx', ''));

        $this->params     = &$params;
        $this->items      = &$items;
        $this->pagination = &$pagination;
        $this->user       = &$user;
        $this->db         = Factory::getDbo();

        $this->_prepareDocument();

        parent::display($tpl);
    }

    /**
     * Prepares the document.
     *
     * @return  void
     */
    protected function _prepareDocument()
    {
        // Because the application sets a default page title,
        // we need to get it from the menu item itself
        $menu = Factory::getApplication()->getMenu()->getActive();

        if ($menu) {
            $this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
        } else {
            $this->params->def('page_heading',
Text::_('JGLOBAL_ARTICLES'));
        }

       
$this->setDocumentTitle($this->params->get('page_title',
''));

        if ($this->params->get('menu-meta_description')) {
           
$this->getDocument()->setDescription($this->params->get('menu-meta_description'));
        }

        if ($this->params->get('robots')) {
            $this->getDocument()->setMetaData('robots',
$this->params->get('robots'));
        }

        // Add feed links
        if ($this->params->get('show_feed_link', 1)) {
            $link    = '&format=feed&limitstart=';
            $attribs = ['type' =>
'application/rss+xml', 'title' =>
htmlspecialchars($this->getDocument()->getTitle())];
            $this->getDocument()->addHeadLink(Route::_($link .
'&type=rss'), 'alternate', 'rel',
$attribs);
            $attribs = ['type' =>
'application/atom+xml', 'title' =>
htmlspecialchars($this->getDocument()->getTitle())];
            $this->getDocument()->addHeadLink(Route::_($link .
'&type=atom'), 'alternate', 'rel',
$attribs);
        }
    }
}
PK��[_
��CCsrc/View/Form/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Form;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * HTML Article View class for the Content component
 *
 * @since  1.5
 */
class HtmlView extends BaseHtmlView
{
    /**
     * The Form object
     *
     * @var  \Joomla\CMS\Form\Form
     */
    protected $form;

    /**
     * The item being created
     *
     * @var  \stdClass
     */
    protected $item;

    /**
     * The page to return to after the article is submitted
     *
     * @var  string
     */
    protected $return_page = '';

    /**
     * The model state
     *
     * @var  \Joomla\Registry\Registry
     */
    protected $state;

    /**
     * The page parameters
     *
     * @var    \Joomla\Registry\Registry|null
     *
     * @since  4.0.0
     */
    protected $params = null;

    /**
     * The page class suffix
     *
     * @var    string
     *
     * @since  4.0.0
     */
    protected $pageclass_sfx = '';

    /**
     * The user object
     *
     * @var \Joomla\CMS\User\User
     *
     * @since  4.0.0
     */
    protected $user = null;

    /**
     * Should we show a captcha form for the submission of the article?
     *
     * @var    boolean
     *
     * @since  3.7.0
     */
    protected $captchaEnabled = false;

    /**
     * Should we show Save As Copy button?
     *
     * @var    boolean
     * @since  4.1.0
     */
    protected $showSaveAsCopy = false;

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
     *
     * @return  void|boolean
     */
    public function display($tpl = null)
    {
        $app  = Factory::getApplication();
        $user = $app->getIdentity();

        // Get model data.
        $this->state       = $this->get('State');
        $this->item        = $this->get('Item');
        $this->form        = $this->get('Form');
        $this->return_page = $this->get('ReturnPage');

        if (empty($this->item->id)) {
            $catid = $this->state->params->get('catid');

            if
($this->state->params->get('enable_category') == 1
&& $catid) {
                $authorised = $user->authorise('core.create',
'com_content.category.' . $catid);
            } else {
                $authorised = $user->authorise('core.create',
'com_content') ||
\count($user->getAuthorisedCategories('com_content',
'core.create'));
            }
        } else {
            $authorised =
$this->item->params->get('access-edit');
        }

        if ($authorised !== true) {
           
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'),
'error');
            $app->setHeader('status', 403, true);

            return false;
        }

        $this->item->tags = new TagsHelper();

        if (!empty($this->item->id)) {
           
$this->item->tags->getItemTags('com_content.article',
$this->item->id);

            $this->item->images =
json_decode($this->item->images);
            $this->item->urls   =
json_decode($this->item->urls);

            $tmp         = new \stdClass();
            $tmp->images = $this->item->images;
            $tmp->urls   = $this->item->urls;
            $this->form->bind($tmp);
        }

        // Check for errors.
        if (\count($errors = $this->get('Errors'))) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        // Create a shortcut to the parameters.
        $params = &$this->state->params;

        // Escape strings for HTML output
        $this->pageclass_sfx =
htmlspecialchars($params->get('pageclass_sfx', ''));

        $this->params = $params;

        // Override global params with article specific params
        $this->params->merge($this->item->params);
        $this->user   = $user;

        // Propose current language as default when creating new article
        if (empty($this->item->id) &&
Multilanguage::isEnabled() &&
$params->get('enable_category') != 1) {
            $lang = $this->getLanguage()->getTag();
            $this->form->setFieldAttribute('language',
'default', $lang);
        }

        $captchaSet = $params->get('captcha',
Factory::getApplication()->get('captcha', '0'));

        foreach (PluginHelper::getPlugin('captcha') as $plugin) {
            if ($captchaSet === $plugin->name) {
                $this->captchaEnabled = true;
                break;
            }
        }

        // If the article is being edited and the current user has
permission to create article
        if (
            $this->item->id
            && ($user->authorise('core.create',
'com_content') ||
\count($user->getAuthorisedCategories('com_content',
'core.create')))
        ) {
            $this->showSaveAsCopy = true;
        }

        $this->_prepareDocument();

        parent::display($tpl);
    }

    /**
     * Prepares the document
     *
     * @return  void
     */
    protected function _prepareDocument()
    {
        $app   = Factory::getApplication();

        // Because the application sets a default page title,
        // we need to get it from the menu item itself
        $menu = $app->getMenu()->getActive();

        if ($menu) {
            $this->params->def('page_heading',
$this->params->get('page_title', $menu->title));
        } else {
            $this->params->def('page_heading',
Text::_('COM_CONTENT_FORM_EDIT_ARTICLE'));
        }

        $title = $this->params->def('page_title',
Text::_('COM_CONTENT_FORM_EDIT_ARTICLE'));

        $this->setDocumentTitle($title);

        $app->getPathway()->addItem($title);

        if ($this->params->get('menu-meta_description')) {
           
$this->getDocument()->setDescription($this->params->get('menu-meta_description'));
        }

        if ($this->params->get('robots')) {
            $this->getDocument()->setMetaData('robots',
$this->params->get('robots'));
        }
    }
}
PK��[���BB
src/View/Categories/HtmlView.phpnu�[���<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Site\View\Categories;

use Joomla\CMS\MVC\View\CategoriesView;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Content categories view.
 *
 * @since  1.5
 */
class HtmlView extends CategoriesView
{
    /**
     * Language key for default page heading
     *
     * @var    string
     * @since  3.2
     */
    protected $pageHeading = 'JGLOBAL_ARTICLES';

    /**
     * @var    string  The name of the extension for the category
     * @since  3.2
     */
    protected $extension = 'com_content';
}
PK.��[��N-??
access.xmlnu�[���<?xml version="1.0"
encoding="utf-8" ?>
<access component="com_content">
	<section name="component">
		<action name="core.admin" title="JACTION_ADMIN"
description="JACTION_ADMIN_COMPONENT_DESC" />
		<action name="core.options"
title="JACTION_OPTIONS"
description="JACTION_OPTIONS_COMPONENT_DESC" />
		<action name="core.manage" title="JACTION_MANAGE"
description="JACTION_MANAGE_COMPONENT_DESC" />
		<action name="core.create" title="JACTION_CREATE"
description="JACTION_CREATE_COMPONENT_DESC" />
		<action name="core.delete" title="JACTION_DELETE"
description="JACTION_DELETE_COMPONENT_DESC" />
		<action name="core.edit" title="JACTION_EDIT"
description="JACTION_EDIT_COMPONENT_DESC" />
		<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="JACTION_EDITSTATE_COMPONENT_DESC" />
		<action name="core.edit.own"
title="JACTION_EDITOWN"
description="JACTION_EDITOWN_COMPONENT_DESC" />
		<action name="core.edit.value"
title="JACTION_EDITVALUE"
description="JACTION_EDITVALUE_COMPONENT_DESC" />
	</section>
	<section name="category">
		<action name="core.create" title="JACTION_CREATE"
description="COM_CATEGORIES_ACCESS_CREATE_DESC" />
		<action name="core.delete" title="JACTION_DELETE"
description="COM_CATEGORIES_ACCESS_DELETE_DESC" />
		<action name="core.edit" title="JACTION_EDIT"
description="COM_CATEGORIES_ACCESS_EDIT_DESC" />
		<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" />
		<action name="core.edit.own"
title="JACTION_EDITOWN"
description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" />
	</section>
	<section name="article">
		<action name="core.delete" title="JACTION_DELETE"
description="COM_CONTENT_ACCESS_DELETE_DESC" />
		<action name="core.edit" title="JACTION_EDIT"
description="COM_CONTENT_ACCESS_EDIT_DESC" />
		<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="COM_CONTENT_ACCESS_EDITSTATE_DESC" />
	</section>
	<section name="fieldgroup">
		<action name="core.create" title="JACTION_CREATE"
description="COM_FIELDS_GROUP_PERMISSION_CREATE_DESC" />
		<action name="core.delete" title="JACTION_DELETE"
description="COM_FIELDS_GROUP_PERMISSION_DELETE_DESC" />
		<action name="core.edit" title="JACTION_EDIT"
description="COM_FIELDS_GROUP_PERMISSION_EDIT_DESC" />
		<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="COM_FIELDS_GROUP_PERMISSION_EDITSTATE_DESC" />
		<action name="core.edit.own"
title="JACTION_EDITOWN"
description="COM_FIELDS_GROUP_PERMISSION_EDITOWN_DESC" />
		<action name="core.edit.value"
title="JACTION_EDITVALUE"
description="COM_FIELDS_GROUP_PERMISSION_EDITVALUE_DESC" />
	</section>
	<section name="field">
		<action name="core.delete" title="JACTION_DELETE"
description="COM_FIELDS_FIELD_PERMISSION_DELETE_DESC" />
		<action name="core.edit" title="JACTION_EDIT"
description="COM_FIELDS_FIELD_PERMISSION_EDIT_DESC" />
		<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="COM_FIELDS_FIELD_PERMISSION_EDITSTATE_DESC" />
		<action name="core.edit.value"
title="JACTION_EDITVALUE"
description="COM_FIELDS_FIELD_PERMISSION_EDITVALUE_DESC" />
	</section>
</access>
PK.��[jd��o�o
config.xmlnu�[���<?xml version="1.0"
encoding="utf-8"?>
<config>
	<fieldset
		name="articles"
		label="JGLOBAL_ARTICLES"
		description="COM_CONTENT_CONFIG_ARTICLE_SETTINGS_DESC"
	>

		<field
			name="article_layout"
			type="componentlayout"
			label="JGLOBAL_FIELD_LAYOUT_LABEL"
			description="JGLOBAL_FIELD_LAYOUT_DESC"
			menuitems="true"
			extension="com_content"
			view="article"
		/>

		<field
			name="show_title"
			type="radio"
			label="JGLOBAL_SHOW_TITLE_LABEL"
			description="JGLOBAL_SHOW_TITLE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_titles"
			type="radio"
			label="JGLOBAL_LINKED_TITLES_LABEL"
			description="JGLOBAL_LINKED_TITLES_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_title:1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_intro"
			type="radio"
			label="JGLOBAL_SHOW_INTRO_LABEL"
			description="JGLOBAL_SHOW_INTRO_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="info_block_position"
			type="list"
			label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
			description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"
			default="0"
			>
			<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
			<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
			<option
value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
		</field>

		<field
			name="info_block_show_title"
			type="radio"
			label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
			description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_category"
			type="radio"
			label="JGLOBAL_SHOW_CATEGORY_LABEL"
			description="JGLOBAL_SHOW_CATEGORY_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_category"
			type="radio"
			label="JGLOBAL_LINK_CATEGORY_LABEL"
			description="JGLOBAL_LINK_CATEGORY_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_category:1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_parent_category"
			type="radio"
			label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
			description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_parent_category"
			type="radio"
			label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
			description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_parent_category:1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="spacer1"
			type="spacer"
			hr="true"
		/>

		<field
			name="show_associations"
			type="radio"
			label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
			description="JGLOBAL_SHOW_ASSOCIATIONS_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="flags"
			type="radio"
			label="JGLOBAL_SHOW_FLAG_LABEL"
			description="JGLOBAL_SHOW_FLAG_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_associations:1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="spacer3"
			type="spacer"
			hr="true"
		/>

		<field
			name="show_author"
			type="radio"
			label="JGLOBAL_SHOW_AUTHOR_LABEL"
			description="JGLOBAL_SHOW_AUTHOR_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="link_author"
			type="radio"
			label="JGLOBAL_LINK_AUTHOR_LABEL"
			description="JGLOBAL_LINK_AUTHOR_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			showon="show_author:1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_create_date"
			type="radio"
			label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
			description="JGLOBAL_SHOW_CREATE_DATE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_modify_date"
			type="radio"
			label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
			description="JGLOBAL_SHOW_MODIFY_DATE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_publish_date"
			type="radio"
			label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
			description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_item_navigation"
			type="radio"
			label="JGLOBAL_SHOW_NAVIGATION_LABEL"
			description="JGLOBAL_SHOW_NAVIGATION_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_vote"
			type="radio"
			label="JGLOBAL_SHOW_VOTE_LABEL"
			description="JGLOBAL_SHOW_VOTE_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_readmore"
			type="radio"
			label="JGLOBAL_SHOW_READMORE_LABEL"
			description="JGLOBAL_SHOW_READMORE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_readmore_title"
			type="radio"
			label="JGLOBAL_SHOW_READMORE_TITLE_LABEL"
			description="JGLOBAL_SHOW_READMORE_TITLE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_readmore:1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="readmore_limit"
			type="number"
			label="JGLOBAL_SHOW_READMORE_LIMIT_LABEL"
			description="JGLOBAL_SHOW_READMORE_LIMIT_DESC"
			default="100"
			showon="show_readmore:1[AND]show_readmore_title:1"
		/>

		<field
			name="show_tags"
			type="radio"
			label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
			description="COM_CONTENT_FIELD_SHOW_TAGS_DESC"
			id="show_tags"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="spacer2"
			type="spacer"
			hr="true"
		/>

		<field
			name="show_icons"
			type="radio"
			label="JGLOBAL_SHOW_ICONS_LABEL"
			description="JGLOBAL_SHOW_ICONS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_print_icon"
			type="radio"
			label="JGLOBAL_SHOW_PRINT_ICON_LABEL"
			description="JGLOBAL_SHOW_PRINT_ICON_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_email_icon"
			type="radio"
			label="JGLOBAL_SHOW_EMAIL_ICON_LABEL"
			description="JGLOBAL_SHOW_EMAIL_ICON_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_hits"
			type="radio"
			label="JGLOBAL_SHOW_HITS_LABEL"
			description="JGLOBAL_SHOW_HITS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="record_hits"
			type="radio"
			label="JGLOBAL_RECORD_HITS_LABEL"
			description="JGLOBAL_RECORD_HITS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="show_noauth"
			type="radio"
			label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
			description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="urls_position"
			type="radio"
			label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
			description="COM_CONTENT_FIELD_URLSPOSITION_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option
value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
			<option
value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
		</field>
	</fieldset>

	<fieldset 
		name="editinglayout" 
		label="COM_CONTENT_EDITING_LAYOUT"
		description="COM_CONTENT_CONFIG_EDITOR_LAYOUT"
	>

		<field
			name="captcha"
			type="plugins"
			label="COM_CONTENT_FIELD_CAPTCHA_LABEL"
			description="COM_CONTENT_FIELD_CAPTCHA_DESC"
			folder="captcha"
			filter="cmd"
			useglobal="true"
			>
			<option value="0">JOPTION_DO_NOT_USE</option>
		</field>

		<field
			name="show_publishing_options"
			type="radio"
			label="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_LABEL"
			description="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_article_options"
			type="radio"
			label="COM_CONTENT_SHOW_ARTICLE_OPTIONS_LABEL"
			description="COM_CONTENT_SHOW_ARTICLE_OPTIONS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="save_history"
			type="radio"
			label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"
			description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="history_limit"
			type="number"
			label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"
			description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"
			filter="integer"
			default="10"
			showon="save_history:1"
		/>

		<field
			name="show_urls_images_frontend"
			type="radio"
			label="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_LABEL"
			description="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="show_urls_images_backend"
			type="radio"
			label="COM_CONTENT_SHOW_IMAGES_URLS_BACK_LABEL"
			description="COM_CONTENT_SHOW_IMAGES_URLS_BACK_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="spacer3"
			type="spacer"
			hr="true"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
		/>

		<field
			name="targeta"
			type="list"
			label="COM_CONTENT_URL_FIELD_A_BROWSERNAV_LABEL"
			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC"
			default="Parent"
			filter="int"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
			>
			<option value="0">JBROWSERTARGET_PARENT</option>
			<option value="1">JBROWSERTARGET_NEW</option>
			<option value="2">JBROWSERTARGET_POPUP</option>
			<option value="3">JBROWSERTARGET_MODAL</option>
		</field>

		<field
			name="targetb"
			type="list"
			label="COM_CONTENT_URL_FIELD_B_BROWSERNAV_LABEL"
			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC"
			default="Parent"
			filter="int"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
			>
			<option value="0">JBROWSERTARGET_PARENT</option>
			<option value="1">JBROWSERTARGET_NEW</option>
			<option value="2">JBROWSERTARGET_POPUP</option>
			<option value="3">JBROWSERTARGET_MODAL</option>
		</field>

		<field
			name="targetc"
			type="list"
			label="COM_CONTENT_URL_FIELD_C_BROWSERNAV_LABEL"
			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC"
			default="Parent"
			filter="int"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
			>
			<option value="0">JBROWSERTARGET_PARENT</option>
			<option value="1">JBROWSERTARGET_NEW</option>
			<option value="2">JBROWSERTARGET_POPUP</option>
			<option value="3">JBROWSERTARGET_MODAL</option>
		</field>

		<field
			name="spacer4"
			type="spacer"
			hr="true"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
		/>

		<field
			name="float_intro"
			type="list"
			label="COM_CONTENT_FLOAT_INTRO_LABEL"
			description="COM_CONTENT_FLOAT_DESC"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
			>
			<option value="right">COM_CONTENT_RIGHT</option>
			<option value="left">COM_CONTENT_LEFT</option>
			<option value="none">COM_CONTENT_NONE</option>
		</field>

		<field
			name="float_fulltext"
			type="list"
			label="COM_CONTENT_FLOAT_FULLTEXT_LABEL"
			description="COM_CONTENT_FLOAT_DESC"
			showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1"
			>
			<option value="right">COM_CONTENT_RIGHT</option>
			<option value="left">COM_CONTENT_LEFT</option>
			<option value="none">COM_CONTENT_NONE</option>
		</field>

	</fieldset>

	<fieldset
		name="category"
		label="JCATEGORY"
		description="COM_CONTENT_CONFIG_CATEGORY_SETTINGS_DESC"
	>

		<field
			name="category_layout" 
			type="componentlayout"
			label="JGLOBAL_FIELD_LAYOUT_LABEL"
			description="JGLOBAL_FIELD_LAYOUT_DESC"
			menuitems="true"
			extension="com_content"
			view="category"
		/>

		<field
			name="show_category_heading_title_text"
			type="radio"
			label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL"
			description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_category_title"
			type="radio"
			label="JGLOBAL_SHOW_CATEGORY_TITLE"
			description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_description"
			type="radio"
			label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL"
			description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_description_image"
			type="radio"
			label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL"
			description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="maxLevel" 
			type="list"
			label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
			description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
			default="-1"
			>
			<option value="0">JNONE</option>
			<option value="-1">JALL</option>
			<option value="1">J1</option>
			<option value="2">J2</option>
			<option value="3">J3</option>
			<option value="4">J4</option>
			<option value="5">J5</option>
		</field>

		<field 
			name="show_empty_categories"
			type="radio"
			label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
			description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_no_articles"
			type="radio"
			label="COM_CONTENT_NO_ARTICLES_LABEL"
			description="COM_CONTENT_NO_ARTICLES_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_subcat_desc"
			type="radio"
			label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
			description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
			default="1"
			class="btn-group btn-group-yesno"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_cat_num_articles"
			type="radio"
			label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
			description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_cat_tags" 
			type="radio"
			label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL"
			description="COM_CONTENT_FIELD_SHOW_CAT_TAGS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

	</fieldset>

	<fieldset 
		name="categories"
		label="JCATEGORIES"
		description="COM_CONTENT_CONFIG_CATEGORIES_SETTINGS_DESC"
	>
		<field 
			name="show_base_description"
			type="radio"
			label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL"
			description="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="maxLevelcat" 
			type="list"
			label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL"
			description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC"
			default="-1"
			>
			<option value="0">JNONE</option>
			<option value="-1">JALL</option>
			<option value="1">J1</option>
			<option value="2">J2</option>
			<option value="3">J3</option>
			<option value="4">J4</option>
			<option value="5">J5</option>
		</field>

		<field 
			name="show_empty_categories_cat"
			type="radio"
			label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL"
			description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			showon="maxLevelcat:-1,1,2,3,4,5"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_subcat_desc_cat"
			type="radio"
			label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL"
			description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="maxLevelcat:-1,1,2,3,4,5"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_cat_num_articles_cat"
			type="radio"
			label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL"
			description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

	</fieldset>

	<fieldset 
		name="blog_default_parameters"
		label="COM_CONTENT_CONFIG_BLOG_SETTINGS_LABEL"
		description="COM_CONTENT_CONFIG_BLOG_SETTINGS_DESC"
	>

		<field 
			name="num_leading_articles"
			type="number"
			label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL"
			description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"
			default="1"			
		/>

		<field 
			name="num_intro_articles"
			type="number"
			label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL"
			description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"
			default="4"
		/>

		<field 
			name="num_columns"
			type="number"
			label="JGLOBAL_NUM_COLUMNS_LABEL"
			description="JGLOBAL_NUM_COLUMNS_DESC"
			default="2"
		/>

		<field 
			name="num_links"
			type="number"
			label="JGLOBAL_NUM_LINKS_LABEL"
			description="JGLOBAL_NUM_LINKS_DESC"
			default="4"
		/>

		<field 
			name="multi_column_order"
			type="list"
			label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL"
			description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"
			default="0"
			showon="num_columns!:,0,1"
			>
			<option value="0">JGLOBAL_DOWN</option>
			<option value="1">JGLOBAL_ACROSS</option>
		</field>

		<field 
			name="spacer1"
			type="spacer"
			hr="true"
		/>

		<field 
			name="show_subcategory_content" 
			type="list"
			label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL"
			description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC"
			default="0"
			>
			<option value="0">JNONE</option>
			<option value="-1">JALL</option>
			<option value="1">J1</option>
			<option value="2">J2</option>
			<option value="3">J3</option>
			<option value="4">J4</option>
			<option value="5">J5</option>
		</field>
	</fieldset>

	<fieldset 
		name="list_default_parameters"
		label="JGLOBAL_LIST_LAYOUT_OPTIONS"
		description="COM_CONTENT_CONFIG_LIST_SETTINGS_DESC"
		addfieldpath="/administrator/components/com_content/models/fields"
	>

		<field 
			name="show_pagination_limit"
			type="radio"
			label="JGLOBAL_DISPLAY_SELECT_LABEL"
			description="JGLOBAL_DISPLAY_SELECT_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="filter_field"
			type="list"
			label="JGLOBAL_FILTER_FIELD_LABEL"
			description="JGLOBAL_FILTER_FIELD_DESC"
			default="hide"
			>
			<option value="hide">JHIDE</option>
			<option value="title">JGLOBAL_TITLE</option>
			<option value="author">JAUTHOR</option>
			<option value="hits">JGLOBAL_HITS</option>
			<option value="tag">JTAG</option>
			<option value="month">JMONTH_PUBLISHED</option>
		</field>

		<field 
			name="show_headings"
			type="radio"
			label="JGLOBAL_SHOW_HEADINGS_LABEL"
			description="JGLOBAL_SHOW_HEADINGS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="list_show_date"
			type="list"
			label="JGLOBAL_SHOW_DATE_LABEL"
			description="JGLOBAL_SHOW_DATE_DESC"
			default="0"
			>
			<option value="0">JHIDE</option>
			<option value="created">JGLOBAL_CREATED</option>
			<option value="modified">JGLOBAL_MODIFIED</option>
			<option value="published">JPUBLISHED</option>
		</field>

		<field 
			name="date_format"
			type="text"
			label="JGLOBAL_DATE_FORMAT_LABEL"
			description="JGLOBAL_DATE_FORMAT_DESC"
			size="15"
			showon="list_show_date:created,modified,published"
		/>

		<field 
			name="list_show_hits"
			type="radio"
			label="JGLOBAL_LIST_HITS_LABEL"
			description="JGLOBAL_LIST_HITS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="list_show_author"
			type="radio"
			label="JGLOBAL_LIST_AUTHOR_LABEL"
			description="JGLOBAL_LIST_AUTHOR_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="list_show_votes"
			type="voteradio"
			label="JGLOBAL_LIST_VOTES_LABEL"
			description="JGLOBAL_LIST_VOTES_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="list_show_ratings"
			type="voteradio"
			label="JGLOBAL_LIST_RATINGS_LABEL"
			description="JGLOBAL_LIST_RATINGS_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

	</fieldset>

	<fieldset
		name="shared"
		label="COM_CONTENT_SHARED_LABEL"
		description="COM_CONTENT_SHARED_DESC"
	>
	
		<field 
			name="orderby_pri"
			type="list"
			label="JGLOBAL_CATEGORY_ORDER_LABEL"
			description="JGLOBAL_CATEGORY_ORDER_DESC"
			default="none"
			>
			<option value="none">JGLOBAL_NO_ORDER</option>
			<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
			<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
			<option
value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option>
		</field>

		<field 
			name="orderby_sec"
			type="list"
			label="JGLOBAL_ARTICLE_ORDER_LABEL"
			description="JGLOBAL_ARTICLE_ORDER_DESC"
			default="rdate"
			>
			<option
value="rdate">JGLOBAL_MOST_RECENT_FIRST</option>
			<option value="date">JGLOBAL_OLDEST_FIRST</option>
			<option
value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option>
			<option
value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option>
			<option
value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option>
			<option
value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option>
			<option value="hits">JGLOBAL_MOST_HITS</option>
			<option value="rhits">JGLOBAL_LEAST_HITS</option>
			<option
value="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option>
			<option
value="rorder">JGLOBAL_ARTICLE_MANAGER_REVERSE_ORDER</option>
			<option value="vote"
requires="vote">JGLOBAL_VOTES_DESC</option>
			<option value="rvote"
requires="vote">JGLOBAL_VOTES_ASC</option>
			<option value="rank"
requires="vote">JGLOBAL_RATINGS_DESC</option>
			<option value="rrank"
requires="vote">JGLOBAL_RATINGS_ASC</option>
		</field>

		<field 
			name="order_date" 
			type="list"
			label="JGLOBAL_ORDERING_DATE_LABEL"
			description="JGLOBAL_ORDERING_DATE_DESC"
			showon="orderby_sec:rdate,date"
			default="published"
			>
			<option value="created">JGLOBAL_CREATED</option>
			<option value="modified">JGLOBAL_MODIFIED</option>
			<option value="published">JPUBLISHED</option>
		</field>

		<field 
			name="show_pagination"
			type="list"
			label="JGLOBAL_PAGINATION_LABEL"
			description="JGLOBAL_PAGINATION_DESC"
			default="2"
			>
			<option value="0">JHIDE</option>
			<option value="1">JSHOW</option>
			<option value="2">JGLOBAL_AUTO</option>
		</field>

		<field 
			name="show_pagination_results"
			type="radio"
			label="JGLOBAL_PAGINATION_RESULTS_LABEL"
			description="JGLOBAL_PAGINATION_RESULTS_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			showon="show_pagination:1,2"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field 
			name="show_featured" 
			type="list" 
			label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL"
			description="JGLOBAL_SHOW_FEATURED_ARTICLES_DESC"
			default="show"
			>
			<option value="show">JSHOW</option>
			<option value="hide">JHIDE</option>
			<option value="only">JONLY</option>
		</field>

	</fieldset>

	<fieldset 
		name="integration"
		label="JGLOBAL_INTEGRATION_LABEL"
		description="COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC"
	>

		<field
			name="integration_newsfeeds"
			type="note"
			label="JGLOBAL_FEED_TITLE"
		/>

		<field
			name="show_feed_link"
			type="radio"
			label="JGLOBAL_SHOW_FEED_LINK_LABEL"
			description="JGLOBAL_SHOW_FEED_LINK_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="feed_summary"
			type="list"
			label="JGLOBAL_FEED_SUMMARY_LABEL"
			description="JGLOBAL_FEED_SUMMARY_DESC"
			default="0"
			showon="show_feed_link:1"
			>
			<option value="0">JGLOBAL_INTRO_TEXT</option>
			<option value="1">JGLOBAL_FULL_TEXT</option>
		</field>

		<field
			name="feed_show_readmore"
			type="radio"
			label="JGLOBAL_FEED_SHOW_READMORE_LABEL"
			description="JGLOBAL_FEED_SHOW_READMORE_DESC"
			class="btn-group btn-group-yesno"
			default="0"
			showon="show_feed_link:1[AND]feed_summary:0"
			>
			<option value="1">JSHOW</option>
			<option value="0">JHIDE</option>
		</field>

		<field
			name="integration_sef"
			type="note"
			label="JGLOBAL_SEF_TITLE"
		/>

		<field
			name="sef_advanced"
			type="radio"
			class="btn-group btn-group-yesno btn-group-reversed"
			default="0"
			label="JGLOBAL_SEF_ADVANCED_LABEL"
			description="JGLOBAL_SEF_ADVANCED_DESC"
			filter="integer"
			>
			<option
value="0">JGLOBAL_SEF_ADVANCED_LEGACY</option>
			<option
value="1">JGLOBAL_SEF_ADVANCED_MODERN</option>
		</field>

		<field
			name="sef_ids"
			type="radio"
			class="btn-group btn-group-yesno"
			default="0"
			label="JGLOBAL_SEF_NOIDS_LABEL"
			description="JGLOBAL_SEF_NOIDS_DESC"
			showon="sef_advanced:1"
			filter="integer"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="integration_customfields"
			type="note"
			label="JGLOBAL_FIELDS_TITLE"
		/>

		<field
			name="custom_fields_enable"
			type="radio"
			label="JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL"
			description="JGLOBAL_CUSTOM_FIELDS_ENABLE_DESC"
			class="btn-group btn-group-yesno"
			default="1"
			>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

	</fieldset>

	<fieldset
		name="permissions"
		label="JCONFIG_PERMISSIONS_LABEL"
		description="JCONFIG_PERMISSIONS_DESC"
	>

		<field
			name="rules"
			type="rules"
			label="JCONFIG_PERMISSIONS_LABEL"
			validate="rules"
			filter="rules"
			component="com_content"
			section="component"
		/>
	</fieldset>
</config>
PK.��[��Ƈ�content.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1"
method="upgrade">
	<name>com_content</name>
	<author>Joomla! Project</author>
	<creationDate>April 2006</creationDate>
	<copyright>(C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>COM_CONTENT_XML_DESCRIPTION</description>
	<files folder="site">
		<filename>content.php</filename>
		<filename>controller.php</filename>
		<filename>router.php</filename>
		<folder>helpers</folder>
		<folder>models</folder>
	</files>
	<languages folder="site">
		<language
tag="en-GB">language/en-GB.com_content.ini</language>
	</languages>
	<administration>
		<files folder="admin">
			<filename>access.xml</filename>
			<filename>config.xml</filename>
			<filename>content.php</filename>
			<filename>controller.php</filename>
			<folder>controllers</folder>
			<folder>elements</folder>
			<folder>helpers</folder>
			<folder>models</folder>
			<folder>tables</folder>
			<folder>views</folder>
		</files>
		<languages folder="admin">
			<language
tag="en-GB">language/en-GB.com_content.ini</language>
			<language
tag="en-GB">language/en-GB.com_content.sys.ini</language>
		</languages>
	</administration>
</extension>


PK.��[LI{��controllers/ajax.json.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\LanguageHelper;

/**
 * The article controller for ajax requests
 *
 * @since  3.9.0
 */
class ContentControllerAjax extends JControllerLegacy
{
	/**
	 * Method to fetch associations of an article
	 *
	 * The method assumes that the following http parameters are passed in an
Ajax Get request:
	 * token: the form token
	 * assocId: the id of the article whose associations are to be returned
	 * excludeLang: the association for this language is to be excluded
	 *
	 * @return  null
	 *
	 * @since  3.9.0
	 */
	public function fetchAssociations()
	{
		if (!JSession::checkToken('get'))
		{
			echo new JResponseJson(null, JText::_('JINVALID_TOKEN'),
true);
		}
		else
		{
			$input = JFactory::getApplication()->input;

			$assocId = $input->getInt('assocId', 0);

			if ($assocId == 0)
			{
				echo new JResponseJson(null,
JText::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'assocId'), true);

				return;
			}

			$excludeLang = $input->get('excludeLang', '',
'STRING');

			$associations =
JLanguageAssociations::getAssociations('com_content',
'#__content', 'com_content.item', (int) $assocId);

			unset($associations[$excludeLang]);

			// Add the title to each of the associated records
			$contentTable = JTable::getInstance('Content',
'JTable');

			foreach ($associations as $lang => $association)
			{
				$contentTable->load($association->id);
				$associations[$lang]->title = $contentTable->title;
			}

			$countContentLanguages =
count(LanguageHelper::getContentLanguages(array(0, 1)));

			if (count($associations) == 0)
			{
				$message =
JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_NONE');
			}
			elseif ($countContentLanguages > count($associations) + 2)
			{
				$tags    = implode(', ', array_keys($associations));
				$message =
JText::sprintf('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_SOME',
$tags);
			}
			else
			{
				$message =
JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_ALL');
			}

			echo new JResponseJson($associations, $message);
		}
	}
}
PK.��[j���controllers/articles.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

/**
 * Articles list controller class.
 *
 * @since  1.6
 */
class ContentControllerArticles extends JControllerAdmin
{
	/**
	 * Constructor.
	 *
	 * @param   array  $config  An optional associative array of configuration
settings.
	 *
	 * @see     JControllerLegacy
	 * @since   1.6
	 */
	public function __construct($config = array())
	{
		parent::__construct($config);

		// Articles default form can come from the articles or featured view.
		// Adjust the redirect view on the value of 'view' in the
request.
		if ($this->input->get('view') == 'featured')
		{
			$this->view_list = 'featured';
		}

		$this->registerTask('unfeatured', 'featured');
	}

	/**
	 * Method to toggle the featured setting of a list of articles.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function featured()
	{
		// Check for request forgeries
		$this->checkToken();

		$user   = JFactory::getUser();
		$ids    = $this->input->get('cid', array(),
'array');
		$values = array('featured' => 1, 'unfeatured'
=> 0);
		$task   = $this->getTask();
		$value  = ArrayHelper::getValue($values, $task, 0, 'int');

		// Access checks.
		foreach ($ids as $i => $id)
		{
			if (!$user->authorise('core.edit.state',
'com_content.article.' . (int) $id))
			{
				// Prune items that you can't change.
				unset($ids[$i]);
				JError::raiseNotice(403,
JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'));
			}
		}

		if (empty($ids))
		{
			JError::raiseWarning(500,
JText::_('JERROR_NO_ITEMS_SELECTED'));
		}
		else
		{
			// Get the model.
			/** @var ContentModelArticle $model */
			$model = $this->getModel();

			// Publish the items.
			if (!$model->featured($ids, $value))
			{
				JError::raiseWarning(500, $model->getError());
			}

			if ($value == 1)
			{
				$message = JText::plural('COM_CONTENT_N_ITEMS_FEATURED',
count($ids));
			}
			else
			{
				$message = JText::plural('COM_CONTENT_N_ITEMS_UNFEATURED',
count($ids));
			}
		}

		$view = $this->input->get('view', '');

		if ($view == 'featured')
		{
			$this->setRedirect(JRoute::_('index.php?option=com_content&view=featured',
false), $message);
		}
		else
		{
			$this->setRedirect(JRoute::_('index.php?option=com_content&view=articles',
false), $message);
		}
	}

	/**
	 * Proxy for getModel.
	 *
	 * @param   string  $name    The model name. Optional.
	 * @param   string  $prefix  The class prefix. Optional.
	 * @param   array   $config  The array of possible config values.
Optional.
	 *
	 * @return  JModelLegacy
	 *
	 * @since   1.6
	 */
	public function getModel($name = 'Article', $prefix =
'ContentModel', $config = array('ignore_request' =>
true))
	{
		return parent::getModel($name, $prefix, $config);
	}
}
PK.��[���PPcontrollers/featured.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContentControllerArticles', __DIR__ .
'/articles.php');

/**
 * Featured content controller class.
 *
 * @since  1.6
 */
class ContentControllerFeatured extends ContentControllerArticles
{
	/**
	 * Removes an item.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public function delete()
	{
		// Check for request forgeries
		$this->checkToken();

		$user = JFactory::getUser();
		$ids  = $this->input->get('cid', array(),
'array');

		// Access checks.
		foreach ($ids as $i => $id)
		{
			if (!$user->authorise('core.delete',
'com_content.article.' . (int) $id))
			{
				// Prune items that you can't delete.
				unset($ids[$i]);
				JError::raiseNotice(403,
JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
			}
		}

		if (empty($ids))
		{
			JError::raiseWarning(500,
JText::_('JERROR_NO_ITEMS_SELECTED'));
		}
		else
		{
			// Get the model.
			/** @var ContentModelFeature $model */
			$model = $this->getModel();

			// Remove the items.
			if (!$model->featured($ids, 0))
			{
				JError::raiseWarning(500, $model->getError());
			}
		}

		$this->setRedirect('index.php?option=com_content&view=featured');
	}

	/**
	 * Method to publish a list of articles.
	 *
	 * @return  void
	 *
	 * @since   1.0
	 */
	public function publish()
	{
		parent::publish();

		$this->setRedirect('index.php?option=com_content&view=featured');
	}

	/**
	 * Method to get a model object, loading it if required.
	 *
	 * @param   string  $name    The model name. Optional.
	 * @param   string  $prefix  The class prefix. Optional.
	 * @param   array   $config  Configuration array for model. Optional.
	 *
	 * @return  JModelLegacy  The model.
	 *
	 * @since   1.6
	 */
	public function getModel($name = 'Feature', $prefix =
'ContentModel', $config = array('ignore_request' =>
true))
	{
		return parent::getModel($name, $prefix, $config);
	}
}
PK.��[�A�h�
�
helpers/associations.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Association\AssociationExtensionHelper;

/**
 * Content associations helper.
 *
 * @since  3.7.0
 */
class ContentAssociationsHelper extends AssociationExtensionHelper
{
	/**
	 * The extension name
	 *
	 * @var     array   $extension
	 *
	 * @since   3.7.0
	 */
	protected $extension = 'com_content';

	/**
	 * Array of item types
	 *
	 * @var     array   $itemTypes
	 *
	 * @since   3.7.0
	 */
	protected $itemTypes = array('article', 'category');

	/**
	 * Has the extension association support
	 *
	 * @var     boolean   $associationsSupport
	 *
	 * @since   3.7.0
	 */
	protected $associationsSupport = true;

	/**
	 * Get the associated items for an item
	 *
	 * @param   string  $typeName  The item type
	 * @param   int     $id        The id of item for which we need the
associated items
	 *
	 * @return  array
	 *
	 * @since   3.7.0
	 */
	public function getAssociations($typeName, $id)
	{
		$type = $this->getType($typeName);

		$context    = $this->extension . '.item';
		$catidField = 'catid';

		if ($typeName === 'category')
		{
			$context    = 'com_categories.item';
			$catidField = '';
		}

		// Get the associations.
		$associations = JLanguageAssociations::getAssociations(
			$this->extension,
			$type['tables']['a'],
			$context,
			$id,
			'id',
			'alias',
			$catidField
		);

		return $associations;
	}

	/**
	 * Get item information
	 *
	 * @param   string  $typeName  The item type
	 * @param   int     $id        The id of item for which we need the
associated items
	 *
	 * @return  JTable|null
	 *
	 * @since   3.7.0
	 */
	public function getItem($typeName, $id)
	{
		if (empty($id))
		{
			return null;
		}

		$table = null;

		switch ($typeName)
		{
			case 'article':
				$table = JTable::getInstance('Content');
				break;

			case 'category':
				$table = JTable::getInstance('Category');
				break;
		}

		if (is_null($table))
		{
			return null;
		}

		$table->load($id);

		return $table;
	}

	/**
	 * Get information about the type
	 *
	 * @param   string  $typeName  The item type
	 *
	 * @return  array  Array of item types
	 *
	 * @since   3.7.0
	 */
	public function getType($typeName = '')
	{
		$fields  = $this->getFieldsTemplate();
		$tables  = array();
		$joins   = array();
		$support = $this->getSupportTemplate();
		$title   = '';

		if (in_array($typeName, $this->itemTypes))
		{
			switch ($typeName)
			{
				case 'article':

					$support['state'] = true;
					$support['acl'] = true;
					$support['checkout'] = true;
					$support['category'] = true;
					$support['save2copy'] = true;

					$tables = array(
						'a' => '#__content'
					);

					$title = 'article';
					break;

				case 'category':
					$fields['created_user_id'] = 'a.created_user_id';
					$fields['ordering'] = 'a.lft';
					$fields['level'] = 'a.level';
					$fields['catid'] = '';
					$fields['state'] = 'a.published';

					$support['state'] = true;
					$support['acl'] = true;
					$support['checkout'] = true;
					$support['level'] = true;

					$tables = array(
						'a' => '#__categories'
					);

					$title = 'category';
					break;
			}
		}

		return array(
			'fields'  => $fields,
			'support' => $support,
			'tables'  => $tables,
			'joins'   => $joins,
			'title'   => $title
		);
	}
}
PK.��[�ד��helpers/content.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Content component helper.
 *
 * @since  1.6
 */
class ContentHelper extends JHelperContent
{
	public static $extension = 'com_content';

	/**
	 * Configure the Linkbar.
	 *
	 * @param   string  $vName  The name of the active view.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	public static function addSubmenu($vName)
	{
		JHtmlSidebar::addEntry(
			JText::_('JGLOBAL_ARTICLES'),
			'index.php?option=com_content&view=articles',
			$vName == 'articles'
		);
		JHtmlSidebar::addEntry(
			JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),
			'index.php?option=com_categories&extension=com_content',
			$vName == 'categories'
		);

		JHtmlSidebar::addEntry(
			JText::_('COM_CONTENT_SUBMENU_FEATURED'),
			'index.php?option=com_content&view=featured',
			$vName == 'featured'
		);

		if (JComponentHelper::isEnabled('com_fields') &&
JComponentHelper::getParams('com_content')->get('custom_fields_enable',
'1'))
		{
			JHtmlSidebar::addEntry(
				JText::_('JGLOBAL_FIELDS'),
				'index.php?option=com_fields&context=com_content.article',
				$vName == 'fields.fields'
			);
			JHtmlSidebar::addEntry(
				JText::_('JGLOBAL_FIELD_GROUPS'),
				'index.php?option=com_fields&view=groups&context=com_content.article',
				$vName == 'fields.groups'
			);
		}
	}

	/**
	 * Applies the content tag filters to arbitrary text as per settings for
current user group
	 *
	 * @param   text  $text  The string to filter
	 *
	 * @return  string  The filtered string
	 *
	 * @deprecated  4.0  Use JComponentHelper::filterText() instead.
	 */
	public static function filterText($text)
	{
		try
		{
			JLog::add(
				sprintf('%s() is deprecated. Use JComponentHelper::filterText()
instead', __METHOD__),
				JLog::WARNING,
				'deprecated'
			);
		}
		catch (RuntimeException $exception)
		{
			// Informational log only
		}

		return JComponentHelper::filterText($text);
	}

	/**
	 * Adds Count Items for Category Manager.
	 *
	 * @param   stdClass[]  &$items  The category objects
	 *
	 * @return  stdClass[]
	 *
	 * @since   3.5
	 */
	public static function countItems(&$items)
	{
		$config = (object) array(
			'related_tbl'   => 'content',
			'state_col'     => 'state',
			'group_col'     => 'catid',
			'relation_type' => 'category_or_group',
		);

		return parent::countRelations($items, $config);
	}

	/**
	 * Adds Count Items for Tag Manager.
	 *
	 * @param   stdClass[]  &$items     The tag objects
	 * @param   string      $extension  The name of the active view.
	 *
	 * @return  stdClass[]
	 *
	 * @since   3.6
	 */
	public static function countTagItems(&$items, $extension)
	{
		$parts   = explode('.', $extension);
		$section = count($parts) > 1 ? $parts[1] : null;

		$config = (object) array(
			'related_tbl'   => ($section === 'category' ?
'categories' : 'content'),
			'state_col'     => ($section === 'category' ?
'published' : 'state'),
			'group_col'     => 'tag_id',
			'extension'     => $extension,
			'relation_type' => 'tag_assigments',
		);

		return parent::countRelations($items, $config);
	}

	/**
	 * Returns a valid section for articles. If it is not valid then null
	 * is returned.
	 *
	 * @param   string  $section  The section to get the mapping for
	 *
	 * @return  string|null  The new section
	 *
	 * @since   3.7.0
	 */
	public static function validateSection($section)
	{
		if (JFactory::getApplication()->isClient('site'))
		{
			// On the front end we need to map some sections
			switch ($section)
			{
				// Editing an article
				case 'form':

				// Category list view
				case 'featured':
				case 'category':
					$section = 'article';
			}
		}

		if ($section != 'article')
		{
			// We don't know other sections
			return null;
		}

		return $section;
	}

	/**
	 * Returns valid contexts
	 *
	 * @return  array
	 *
	 * @since   3.7.0
	 */
	public static function getContexts()
	{
		JFactory::getLanguage()->load('com_content',
JPATH_ADMINISTRATOR);

		$contexts = array(
			'com_content.article'    =>
JText::_('COM_CONTENT'),
			'com_content.categories' => JText::_('JCATEGORY')
		);

		return $contexts;
	}
}
PK.��[H����%helpers/html/contentadministrator.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

JLoader::register('ContentHelper', JPATH_ADMINISTRATOR .
'/components/com_content/helpers/content.php');

/**
 * Content HTML helper
 *
 * @since  3.0
 */
abstract class JHtmlContentAdministrator
{
	/**
	 * Render the list of associated items
	 *
	 * @param   integer  $articleid  The article item id
	 *
	 * @return  string  The language HTML
	 *
	 * @throws  Exception
	 */
	public static function association($articleid)
	{
		// Defaults
		$html = '';

		// Get the associations
		if ($associations =
JLanguageAssociations::getAssociations('com_content',
'#__content', 'com_content.item', $articleid))
		{
			foreach ($associations as $tag => $associated)
			{
				$associations[$tag] = (int) $associated->id;
			}

			// Get the associated menu items
			$db = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select('c.*')
				->select('l.sef as lang_sef')
				->select('l.lang_code')
				->from('#__content as c')
				->select('cat.title as category_title')
				->join('LEFT', '#__categories as cat ON
cat.id=c.catid')
				->where('c.id IN (' . implode(',',
array_values($associations)) . ')')
				->where('c.id != ' . $articleid)
				->join('LEFT', '#__languages as l ON
c.language=l.lang_code')
				->select('l.image')
				->select('l.title as language_title');
			$db->setQuery($query);

			try
			{
				$items = $db->loadObjectList('id');
			}
			catch (RuntimeException $e)
			{
				throw new Exception($e->getMessage(), 500, $e);
			}

			if ($items)
			{
				foreach ($items as &$item)
				{
					$text    = $item->lang_sef ? strtoupper($item->lang_sef) :
'XX';
					$url     =
JRoute::_('index.php?option=com_content&task=article.edit&id='
. (int) $item->id);

					$tooltip = htmlspecialchars($item->title, ENT_QUOTES,
'UTF-8') . '<br />' .
JText::sprintf('JCATEGORY_SPRINTF', $item->category_title);
					$classes = 'hasPopover label label-association label-' .
$item->lang_sef;

					$item->link = '<a href="' . $url . '"
title="' . $item->language_title . '"
class="' . $classes
						. '" data-content="' . $tooltip . '"
data-placement="top">'
						. $text . '</a>';
				}
			}

			JHtml::_('bootstrap.popover');

			$html = JLayoutHelper::render('joomla.content.associations',
$items);
		}

		return $html;
	}

	/**
	 * Show the feature/unfeature links
	 *
	 * @param   integer  $value      The state value
	 * @param   integer  $i          Row number
	 * @param   boolean  $canChange  Is user allowed to change?
	 *
	 * @return  string       HTML code
	 */
	public static function featured($value = 0, $i = 0, $canChange = true)
	{
		JHtml::_('bootstrap.tooltip');

		// Array of image, task, title, action
		$states = array(
			0 => array('unfeatured', 'articles.featured',
'COM_CONTENT_UNFEATURED', 'JGLOBAL_TOGGLE_FEATURED'),
			1 => array('featured', 'articles.unfeatured',
'COM_CONTENT_FEATURED', 'JGLOBAL_TOGGLE_FEATURED'),
		);
		$state = ArrayHelper::getValue($states, (int) $value, $states[1]);
		$icon  = $state[0];

		if ($canChange)
		{
			$html = '<a href="#" onclick="return
listItemTask(\'cb' . $i . '\',\'' . $state[1]
. '\')" class="btn btn-micro hasTooltip'
				. ($value == 1 ? ' active' : '') . '"
title="' . JHtml::_('tooltipText', $state[3])
				. '"><span class="icon-' . $icon .
'" aria-hidden="true"></span></a>';
		}
		else
		{
			$html = '<a class="btn btn-micro hasTooltip disabled'
. ($value == 1 ? ' active' : '') . '"
title="'
				. JHtml::_('tooltipText', $state[2]) .
'"><span class="icon-' . $icon . '"
aria-hidden="true"></span></a>';
		}

		return $html;
	}
}
PK.��[Ce1���models/feature.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::register('ContentModelArticle', __DIR__ .
'/article.php');

/**
 * Feature model.
 *
 * @since  1.6
 */
class ContentModelFeature extends ContentModelArticle
{
	/**
	 * Returns a Table object, always creating it.
	 *
	 * @param   string  $type    The table type to instantiate
	 * @param   string  $prefix  A prefix for the table class name. Optional.
	 * @param   array   $config  Configuration array for model. Optional.
	 *
	 * @return  JTable	A database object
	 *
	 * @since   1.6
	 */
	public function getTable($type = 'Featured', $prefix =
'ContentTable', $config = array())
	{
		return JTable::getInstance($type, $prefix, $config);
	}

	/**
	 * A protected method to get a set of ordering conditions.
	 *
	 * @param   object  $table  A record object.
	 *
	 * @return  array  An array of conditions to add to add to ordering
queries.
	 *
	 * @since   1.6
	 */
	protected function getReorderConditions($table)
	{
		return array();
	}
}
PK.��[Tp?&e&e&models/fields/modal/article.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Language\LanguageHelper;

/**
 * Supports a modal article picker.
 *
 * @since  1.6
 */
class JFormFieldModal_Article extends JFormField
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  1.6
	 */
	protected $type = 'Modal_Article';

	/**
	 * Method to get the field input markup.
	 *
	 * @return  string  The field input markup.
	 *
	 * @since   1.6
	 */
	protected function getInput()
	{
		$allowNew       = ((string) $this->element['new'] ==
'true');
		$allowEdit      = ((string) $this->element['edit'] ==
'true');
		$allowClear     = ((string) $this->element['clear'] !=
'false');
		$allowSelect    = ((string) $this->element['select'] !=
'false');
		$allowPropagate = ((string) $this->element['propagate'] ==
'true');

		$languages = LanguageHelper::getContentLanguages(array(0, 1));

		// Load language
		JFactory::getLanguage()->load('com_content',
JPATH_ADMINISTRATOR);

		// The active article id field.
		$value = (int) $this->value > 0 ? (int) $this->value :
'';

		// Create the modal id.
		$modalId = 'Article_' . $this->id;

		// Add the modal field script to the document head.
		JHtml::_('jquery.framework');
		JHtml::_('script', 'system/modal-fields.js',
array('version' => 'auto', 'relative'
=> true));

		// Script to proxy the select modal function to the modal-fields.js file.
		if ($allowSelect)
		{
			static $scriptSelect = null;

			if (is_null($scriptSelect))
			{
				$scriptSelect = array();
			}

			if (!isset($scriptSelect[$this->id]))
			{
				JFactory::getDocument()->addScriptDeclaration("
				function jSelectArticle_" . $this->id . "(id, title,
catid, object, url, language) {
					window.processModalSelect('Article', '" .
$this->id . "', id, title, catid, object, url, language);
				}
				");

				JText::script('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED');

				$scriptSelect[$this->id] = true;
			}
		}

		// Setup variables for display.
		$linkArticles =
'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;'
. JSession::getFormToken() . '=1';
		$linkArticle  =
'index.php?option=com_content&amp;view=article&amp;layout=modal&amp;tmpl=component&amp;'
. JSession::getFormToken() . '=1';

		if (isset($this->element['language']))
		{
			$linkArticles .= '&amp;forcedLanguage=' .
$this->element['language'];
			$linkArticle  .= '&amp;forcedLanguage=' .
$this->element['language'];
			$modalTitle    = JText::_('COM_CONTENT_CHANGE_ARTICLE') .
' &#8212; ' . $this->element['label'];
		}
		else
		{
			$modalTitle    = JText::_('COM_CONTENT_CHANGE_ARTICLE');
		}

		$urlSelect = $linkArticles .
'&amp;function=jSelectArticle_' . $this->id;
		$urlEdit   = $linkArticle .
'&amp;task=article.edit&amp;id=\' +
document.getElementById("' . $this->id .
'_id").value + \'';
		$urlNew    = $linkArticle . '&amp;task=article.add';

		if ($value)
		{
			$db    = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select($db->quoteName('title'))
				->from($db->quoteName('#__content'))
				->where($db->quoteName('id') . ' = ' . (int)
$value);
			$db->setQuery($query);

			try
			{
				$title = $db->loadResult();
			}
			catch (RuntimeException $e)
			{
				JError::raiseWarning(500, $e->getMessage());
			}
		}

		$title = empty($title) ?
JText::_('COM_CONTENT_SELECT_AN_ARTICLE') :
htmlspecialchars($title, ENT_QUOTES, 'UTF-8');

		// The current article display field.
		$html  = '<span class="input-append">';
		$html .= '<input class="input-medium" id="' .
$this->id . '_name" type="text" value="' .
$title . '" disabled="disabled" size="35"
/>';

		// Select article button
		if ($allowSelect)
		{
			$html .= '<button'
				. ' type="button"'
				. ' class="btn hasTooltip' . ($value ? '
hidden' : '') . '"'
				. ' id="' . $this->id . '_select"'
				. ' data-toggle="modal"'
				. ' data-target="#ModalSelect' . $modalId .
'"'
				. ' title="' .
JHtml::tooltipText('COM_CONTENT_CHANGE_ARTICLE') .
'">'
				. '<span class="icon-file"
aria-hidden="true"></span> ' .
JText::_('JSELECT')
				. '</button>';
		}

		// New article button
		if ($allowNew)
		{
			$html .= '<button'
				. ' type="button"'
				. ' class="btn hasTooltip' . ($value ? '
hidden' : '') . '"'
				. ' id="' . $this->id . '_new"'
				. ' data-toggle="modal"'
				. ' data-target="#ModalNew' . $modalId .
'"'
				. ' title="' .
JHtml::tooltipText('COM_CONTENT_NEW_ARTICLE') .
'">'
				. '<span class="icon-new"
aria-hidden="true"></span> ' .
JText::_('JACTION_CREATE')
				. '</button>';
		}

		// Edit article button
		if ($allowEdit)
		{
			$html .= '<button'
				. ' type="button"'
				. ' class="btn hasTooltip' . ($value ? '' :
' hidden') . '"'
				. ' id="' . $this->id . '_edit"'
				. ' data-toggle="modal"'
				. ' data-target="#ModalEdit' . $modalId .
'"'
				. ' title="' .
JHtml::tooltipText('COM_CONTENT_EDIT_ARTICLE') .
'">'
				. '<span class="icon-edit"
aria-hidden="true"></span> ' .
JText::_('JACTION_EDIT')
				. '</button>';
		}

		// Clear article button
		if ($allowClear)
		{
			$html .= '<button'
				. ' type="button"'
				. ' class="btn' . ($value ? '' : '
hidden') . '"'
				. ' id="' . $this->id . '_clear"'
				. ' onclick="window.processModalParent(\'' .
$this->id . '\'); return false;">'
				. '<span class="icon-remove"
aria-hidden="true"></span>' .
JText::_('JCLEAR')
				. '</button>';
		}

		// Propagate article button
		if ($allowPropagate && count($languages) > 2)
		{
			// Strip off language tag at the end
			$tagLength = (int) strlen($this->element['language']);
			$callbackFunctionStem = substr("jSelectArticle_" .
$this->id, 0, -$tagLength);

			$html .= '<a'
			. ' class="btn hasTooltip' . ($value ? '' :
' hidden') . '"'
			. ' id="' . $this->id . '_propagate"'
			. ' href="#"'
			. ' title="' .
JHtml::tooltipText('JGLOBAL_ASSOCIATIONS_PROPAGATE_TIP') .
'"'
			. ' onclick="Joomla.propagateAssociation(\'' .
$this->id . '\', \'' . $callbackFunctionStem .
'\');">'
			. '<span class="icon-refresh"
aria-hidden="true"></span>' .
JText::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_BUTTON')
			. '</a>';
		}

		$html .= '</span>';

		// Select article modal
		if ($allowSelect)
		{
			$html .= JHtml::_(
				'bootstrap.renderModal',
				'ModalSelect' . $modalId,
				array(
					'title'       => $modalTitle,
					'url'         => $urlSelect,
					'height'      => '400px',
					'width'       => '800px',
					'bodyHeight'  => '70',
					'modalWidth'  => '80',
					'footer'      => '<button type="button"
class="btn" data-dismiss="modal">' .
JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>',
				)
			);
		}

		// New article modal
		if ($allowNew)
		{
			$html .= JHtml::_(
				'bootstrap.renderModal',
				'ModalNew' . $modalId,
				array(
					'title'       =>
JText::_('COM_CONTENT_NEW_ARTICLE'),
					'backdrop'    => 'static',
					'keyboard'    => false,
					'closeButton' => false,
					'url'         => $urlNew,
					'height'      => '400px',
					'width'       => '800px',
					'bodyHeight'  => '70',
					'modalWidth'  => '80',
					'footer'      => '<button type="button"
class="btn"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'add\', \'article\',
\'cancel\', \'item-form\'); return
false;">'
							. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
							. '<button type="button" class="btn
btn-primary"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'add\', \'article\',
\'save\', \'item-form\'); return false;">'
							. JText::_('JSAVE') . '</button>'
							. '<button type="button" class="btn
btn-success"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'add\', \'article\',
\'apply\', \'item-form\'); return
false;">'
							. JText::_('JAPPLY') . '</button>',
				)
			);
		}

		// Edit article modal
		if ($allowEdit)
		{
			$html .= JHtml::_(
				'bootstrap.renderModal',
				'ModalEdit' . $modalId,
				array(
					'title'       =>
JText::_('COM_CONTENT_EDIT_ARTICLE'),
					'backdrop'    => 'static',
					'keyboard'    => false,
					'closeButton' => false,
					'url'         => $urlEdit,
					'height'      => '400px',
					'width'       => '800px',
					'bodyHeight'  => '70',
					'modalWidth'  => '80',
					'footer'      => '<button type="button"
class="btn"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'edit\', \'article\',
\'cancel\', \'item-form\'); return
false;">'
							. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') .
'</button>'
							. '<button type="button" class="btn
btn-primary"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'edit\', \'article\',
\'save\', \'item-form\'); return false;">'
							. JText::_('JSAVE') . '</button>'
							. '<button type="button" class="btn
btn-success"'
							. ' onclick="window.processModalEdit(this, \'' .
$this->id . '\', \'edit\', \'article\',
\'apply\', \'item-form\'); return
false;">'
							. JText::_('JAPPLY') . '</button>',
				)
			);
		}

		// Note: class='required' for client side validation.
		$class = $this->required ? ' class="required
modal-value"' : '';

		$html .= '<input type="hidden" id="' .
$this->id . '_id" ' . $class . '
data-required="' . (int) $this->required . '"
name="' . $this->name
			. '" data-text="' .
htmlspecialchars(JText::_('COM_CONTENT_SELECT_AN_ARTICLE'),
ENT_COMPAT, 'UTF-8') . '" value="' . $value .
'" />';

		return $html;
	}

	/**
	 * Method to get the field label markup.
	 *
	 * @return  string  The field label markup.
	 *
	 * @since   3.4
	 */
	protected function getLabel()
	{
		return str_replace($this->id, $this->id . '_id',
parent::getLabel());
	}
}
PK.��[ɞ�ggmodels/fields/voteradio.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JFormHelper::loadFieldClass('radio');

/**
 * Voteradio Field class.
 *
 * @since  3.8.0
 */
class JFormFieldVoteradio extends JFormFieldRadio
{
	/**
	 * The form field type.
	 *
	 * @var    string
	 * @since  3.7.1
	 */
	protected $type = 'Voteradio';

	/**
	 * Method to get the field Label.
	 *
	 * @return array The field label objects.
	 *
	 * @throws \Exception
	 *
	 * @since  3.8.2
	 */
	public function getLabel()
	{
		// Requires vote plugin enabled
		return JPluginHelper::isEnabled('content', 'vote') ?
parent::getLabel() : null;
	}

	/**
	 * Method to get the field options.
	 *
	 * @return array The field option objects.
	 *
	 * @throws \Exception
	 *
	 * @since  3.7.1
	 */
	public function getOptions()
	{
		// Requires vote plugin enabled
		return JPluginHelper::isEnabled('content', 'vote') ?
parent::getOptions() : array();
	}
}
PK.��[z��
models/forms/filter_featured.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="filter">
		<field
			name="search"
			type="text"
			inputmode="search"
			label="COM_CONTENT_FILTER_SEARCH_LABEL"
			description="COM_CONTENT_FILTER_SEARCH_DESC"
			hint="JSEARCH_FILTER"
		/>

		<field
			name="published"
			type="status"
			label="COM_CONTENT_FILTER_PUBLISHED"
			description="COM_CONTENT_FILTER_PUBLISHED_DESC"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_PUBLISHED</option>
		</field>

		<field
			name="category_id"
			type="category"
			label="JOPTION_FILTER_CATEGORY"
			description="JOPTION_FILTER_CATEGORY_DESC"
			multiple="true"
			class="multipleCategories"
			extension="com_content"
			onchange="this.form.submit();"
		/>

		<field
			name="level"
			type="integer"
			label="JOPTION_FILTER_LEVEL"
			description="JOPTION_FILTER_LEVEL_DESC"
			first="1"
			last="10"
			step="1"
			languages="*"
			onchange="this.form.submit();"
			>
			<option
value="">JOPTION_SELECT_MAX_LEVELS</option>
		</field>

		<field
			name="access"
			type="accesslevel"
			label="JOPTION_FILTER_ACCESS"
			description="JOPTION_FILTER_ACCESS_DESC"
			multiple="true"
			class="multipleAccessLevels"
			onchange="this.form.submit();"
		/>

		<field
			name="author_id"
			type="author"
			label="COM_CONTENT_FILTER_AUTHOR"
			description="COM_CONTENT_FILTER_AUTHOR_DESC"
			multiple="true"
			class="multipleAuthors"
			onchange="this.form.submit();"
			>
			<option value="0">JNONE</option>
		</field>

		<field
			name="language"
			type="contentlanguage"
			label="JOPTION_FILTER_LANGUAGE"
			description="JOPTION_FILTER_LANGUAGE_DESC"
			onchange="this.form.submit();"
			>
			<option value="">JOPTION_SELECT_LANGUAGE</option>
			<option value="*">JALL</option>
		</field>

		<field
			name="tag"
			type="tag"
			label="JOPTION_FILTER_TAG"
			description="JOPTION_FILTER_TAG_DESC"
			multiple="true"
			class="multipleTags"
			mode="nested"
			onchange="this.form.submit();"
		/>
	</fields>

	<fields name="list">
		<field
			name="fullordering"
			type="list"
			label="COM_CONTENT_LIST_FULL_ORDERING"
			description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
			onchange="this.form.submit();"
			default="a.title ASC"
			validate="options"
			>
			<option value="">JGLOBAL_SORT_BY</option>
			<option value="fp.ordering
ASC">JGRID_HEADING_ORDERING_ASC</option>
			<option value="fp.ordering
DESC">JGRID_HEADING_ORDERING_DESC</option>
			<option value="a.state ASC">JSTATUS_ASC</option>
			<option value="a.state DESC">JSTATUS_DESC</option>
			<option value="a.title
ASC">JGLOBAL_TITLE_ASC</option>
			<option value="a.title
DESC">JGLOBAL_TITLE_DESC</option>
			<option value="category_title
ASC">JCATEGORY_ASC</option>
			<option value="category_title
DESC">JCATEGORY_DESC</option>
			<option value="a.access
ASC">JGRID_HEADING_ACCESS_ASC</option>
			<option value="a.access
DESC">JGRID_HEADING_ACCESS_DESC</option>
			<option value="a.created_by
ASC">JAUTHOR_ASC</option>
			<option value="a.created_by
DESC">JAUTHOR_DESC</option>
			<option value="a.publish_up
ASC">COM_CONTENT_PUBLISH_UP_ASC</option>
			<option value="a.publish_up
DESC">COM_CONTENT_PUBLISH_UP_DESC</option>
			<option value="a.publish_down
ASC">COM_CONTENT_PUBLISH_DOWN_ASC</option>
			<option value="a.publish_down
DESC">COM_CONTENT_PUBLISH_DOWN_DESC</option>
			<option value="language
ASC">JGRID_HEADING_LANGUAGE_ASC</option>
			<option value="language
DESC">JGRID_HEADING_LANGUAGE_DESC</option>
			<option value="a.created ASC">JDATE_ASC</option>
			<option value="a.created DESC">JDATE_DESC</option>
			<option value="a.hits
ASC">JGLOBAL_HITS_ASC</option>
			<option value="a.hits
DESC">JGLOBAL_HITS_DESC</option>
			<option value="rating_count ASC"
requires="vote">JGLOBAL_VOTES_ASC</option>
			<option value="rating_count DESC"
requires="vote">JGLOBAL_VOTES_DESC</option>
			<option value="rating ASC"
requires="vote">JGLOBAL_RATINGS_ASC</option>
			<option value="rating DESC"
requires="vote">JGLOBAL_RATINGS_DESC</option>
			<option value="a.id
ASC">JGRID_HEADING_ID_ASC</option>
			<option value="a.id
DESC">JGRID_HEADING_ID_DESC</option>
		</field>

		<field
			name="limit"
			type="limitbox"
			label="COM_CONTENT_LIST_LIMIT"
			description="COM_CONTENT_LIST_LIMIT_DESC"
			class="input-mini"
			default="25"
			onchange="this.form.submit();"
		/>
	</fields>
</form>
PK.��[,��RRtables/featured.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Featured Table class.
 *
 * @since  1.6
 */
class ContentTableFeatured extends JTable
{
	/**
	 * Constructor
	 *
	 * @param   JDatabaseDriver  $db  Database connector object
	 *
	 * @since   1.6
	 */
	public function __construct(&$db)
	{
		parent::__construct('#__content_frontpage',
'content_id', $db);
	}
}
PK/��[�"Z@@views/article/tmpl/edit.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '#jform_catid', null,
array('disable_search_threshold' => 0 ));
JHtml::_('formbehavior.chosen', '#jform_tags', null,
array('placeholder_text_multiple' =>
JText::_('JGLOBAL_TYPE_OR_SELECT_SOME_TAGS')));
JHtml::_('formbehavior.chosen', 'select');

$this->configFieldsets  = array('editorConfig');
$this->hiddenFieldsets  = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata',
'item_associations');

// Create shortcut to parameters.
$params = clone $this->state->get('params');
$params->merge(new Registry($this->item->attribs));

$app = JFactory::getApplication();
$input = $app->input;

$assoc = JLanguageAssociations::isEnabled();

JFactory::getDocument()->addScriptDeclaration('
	Joomla.submitbutton = function(task)
	{
		if (task == "article.cancel" ||
document.formvalidator.isValid(document.getElementById("item-form")))
		{
			jQuery("#permissions-sliders
select").attr("disabled", "disabled");
			' . $this->form->getField('articletext')->save()
. '
			Joomla.submitform(task, document.getElementById("item-form"));

			// @deprecated 4.0  The following js is not needed since 3.7.0.
			if (task !== "article.apply")
			{
				window.parent.jQuery("#articleEdit' . (int)
$this->item->id . 'Modal").modal("hide");
			}
		}
	};
');

// In case of modal
$isModal = $input->get('layout') == 'modal' ? true :
false;
$layout  = $isModal ? 'modal' : 'edit';
$tmpl    = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
?>

<form action="<?php echo
JRoute::_('index.php?option=com_content&layout=' . $layout .
$tmpl . '&id=' . (int) $this->item->id); ?>"
method="post" name="adminForm" id="item-form"
class="form-validate">

	<?php echo JLayoutHelper::render('joomla.edit.title_alias',
$this); ?>

	<div class="form-horizontal">
		<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>

		<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', JText::_('COM_CONTENT_ARTICLE_CONTENT'));
?>
		<div class="row-fluid">
			<div class="span9">
				<fieldset class="adminform">
					<?php echo $this->form->getInput('articletext');
?>
				</fieldset>
			</div>
			<div class="span3">
				<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
			</div>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>

		<?php // Do not show the images and links options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_urls_images_backend') == 1)
: ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'images',
JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo $this->form->renderField('images');
?>
					<?php foreach ($this->form->getGroup('images') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
				<div class="span6">
					<?php foreach ($this->form->getGroup('urls') as
$field) : ?>
						<?php echo $field->renderField(); ?>
					<?php endforeach; ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php $this->show_options =
$params->get('show_article_options', 1); ?>
		<?php echo JLayoutHelper::render('joomla.edit.params',
$this); ?>

		<?php // Do not show the publishing options if the edit form is
configured not to. ?>
		<?php if ($params->get('show_publishing_options', 1) ==
1) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'publishing',
JText::_('COM_CONTENT_FIELDSET_PUBLISHING')); ?>
			<div class="row-fluid form-horizontal-desktop">
				<div class="span6">
					<?php echo
JLayoutHelper::render('joomla.edit.publishingdata', $this); ?>
				</div>
				<div class="span6">
					<?php echo JLayoutHelper::render('joomla.edit.metadata',
$this); ?>
				</div>
			</div>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>


		<?php if ( ! $isModal && $assoc) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'associations',
JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
			<?php echo $this->loadTemplate('associations'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php elseif ($isModal && $assoc) : ?>
			<div class="hidden"><?php echo
$this->loadTemplate('associations'); ?></div>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'editor',
JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG')); ?>
			<?php echo
$this->form->renderFieldset('editorConfig'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php if ($this->canDo->get('core.admin')) : ?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'permissions', JText::_('COM_CONTENT_FIELDSET_RULES'));
?>
				<?php echo $this->form->getInput('rules'); ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>

		<?php echo JHtml::_('bootstrap.endTabSet'); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="return"
value="<?php echo $input->get('return', null,
'BASE64'); ?>" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo $input->get('forcedLanguage',
'', 'cmd'); ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
PK/��[�٢XXviews/article/tmpl/edit.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLE_VIEW_EDIT_TITLE">
		<message>
			<![CDATA[COM_CONTENT_ARTICLE_VIEW_EDIT_DESC]]>
		</message>
	</layout>
	<fieldset name="request">
		<fields name="request">
			<field
				name="id"
				type="hidden"
				default="0"
			/>
		</fields>
	</fieldset>
</metadata>
PK/��[�]��UU(views/article/tmpl/edit_associations.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
PK/��[R�K�QQ$views/article/tmpl/edit_metadata.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
PK/��[��llviews/article/tmpl/modal.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));

// @deprecated 4.0 the function parameter, the inline js and the buttons
are not needed since 3.7.0.
$function  =
JFactory::getApplication()->input->getCmd('function',
'jEditArticle_' . (int) $this->item->id);

// Function to update input title when changed
JFactory::getDocument()->addScriptDeclaration('
	function jEditArticleModal() {
		if (window.parent &&
document.formvalidator.isValid(document.getElementById("item-form")))
{
			return window.parent.' . $this->escape($function) .
'(document.getElementById("jform_title").value);
		}
	}
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.apply');
jEditArticleModal();"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.save');
jEditArticleModal();"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('article.cancel');"></button>

<div class="container-popup">
	<?php $this->setLayout('edit'); ?>
	<?php echo $this->loadTemplate(); ?>
</div>
PK/��[�]��UU)views/article/tmpl/modal_associations.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.associations', $this);
PK/��[R�K�QQ%views/article/tmpl/modal_metadata.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

echo JLayoutHelper::render('joomla.edit.metadata', $this);
PK/��[��k!��
views/article/tmpl/pagebreak.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_content/admin-article-pagebreak.min.js',
array('version' => 'auto', 'relative'
=> true));

$document    = JFactory::getDocument();
$this->eName =
JFactory::getApplication()->input->getCmd('e_name',
'');
$this->eName = preg_replace('#[^A-Z0-9\-\_\[\]]#i',
'', $this->eName);

$document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
?>
<div class="container-popup">
	<form class="form-horizontal">

		<div class="control-group">
			<label for="title"
class="control-label"><?php echo
JText::_('COM_CONTENT_PAGEBREAK_TITLE'); ?></label>
			<div class="controls"><input type="text"
id="title" name="title" /></div>
		</div>

		<div class="control-group">
			<label for="alias"
class="control-label"><?php echo
JText::_('COM_CONTENT_PAGEBREAK_TOC'); ?></label>
			<div class="controls"><input type="text"
id="alt" name="alt" /></div>
		</div>

		<button onclick="insertPagebreak('<?php echo
$this->eName; ?>');" class="btn btn-success
pull-right">
			<?php echo JText::_('COM_CONTENT_PAGEBREAK_INSERT_BUTTON');
?>
		</button>

	</form>
</div>
PK/��[��
��8�8views/articles/tmpl/default.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');

$app       = JFactory::getApplication();
$user      = JFactory::getUser();
$userId    = $user->get('id');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$columns   = 10;

if (strpos($listOrder, 'publish_up') !== false)
{
	$orderingColumn = 'publish_up';
}
elseif (strpos($listOrder, 'publish_down') !== false)
{
	$orderingColumn = 'publish_down';
}
elseif (strpos($listOrder, 'modified') !== false)
{
	$orderingColumn = 'modified';
}
else
{
	$orderingColumn = 'created';
}

if ($saveOrder)
{
	$saveOrderingUrl =
'index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component';
	JHtml::_('sortablelist.sortable', 'articleList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}

$assoc = JLanguageAssociations::isEnabled();
?>

<form action="<?php echo
JRoute::_('index.php?option=com_content&view=articles');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
	<div id="j-sidebar-container" class="span2">
		<?php echo $this->sidebar; ?>
	</div>
	<div id="j-main-container" class="span10">
<?php else : ?>
	<div id="j-main-container">
<?php endif; ?>
		<?php
		// Search tools bar
		echo JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this));
		?>
		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped"
id="articleList">
				<thead>
					<tr>
						<th width="1%" class="nowrap center
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', '',
'a.ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
						</th>
						<th width="1%" class="center">
							<?php echo JHtml::_('grid.checkall'); ?>
						</th>
						<th width="1%" class="nowrap center">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th style="min-width:100px" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<?php if ($assoc) : ?>
							<?php $columns++; ?>
							<th width="5%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'COM_CONTENT_HEADING_ASSOCIATION', 'association',
$listDirn, $listOrder); ?>
							</th>
						<?php endif; ?>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort', 
'JAUTHOR', 'a.created_by', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn),
'a.' . $orderingColumn, $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
						</th>
						<?php if ($this->vote) : ?>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_VOTES', 'rating_count', $listDirn,
$listOrder); ?>
							</th>
							<?php $columns++; ?>
							<th width="1%" class="nowrap
hidden-phone">
								<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder);
?>
							</th>
						<?php endif; ?>
						<th width="1%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="<?php echo $columns; ?>">
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php foreach ($this->items as $i => $item) :
					$item->max_ordering = 0;
					$ordering   = ($listOrder == 'a.ordering');
					$canCreate  = $user->authorise('core.create',    
'com_content.category.' . $item->catid);
					$canEdit    = $user->authorise('core.edit',      
'com_content.article.' . $item->id);
					$canCheckin = $user->authorise('core.manage',    
'com_checkin') || $item->checked_out == $userId ||
$item->checked_out == 0;
					$canEditOwn = $user->authorise('core.edit.own',  
'com_content.article.' . $item->id) &&
$item->created_by == $userId;
					$canChange  = $user->authorise('core.edit.state',
'com_content.article.' . $item->id) && $canCheckin;
					$canEditCat    = $user->authorise('core.edit',      
'com_content.category.' . $item->catid);
					$canEditOwnCat = $user->authorise('core.edit.own',  
'com_content.category.' . $item->catid) &&
$item->category_uid == $userId;
					$canEditParCat    = $user->authorise('core.edit',      
'com_content.category.' . $item->parent_category_id);
					$canEditOwnParCat = $user->authorise('core.edit.own',  
'com_content.category.' . $item->parent_category_id)
&& $item->parent_category_uid == $userId;
					?>
					<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->catid; ?>">
						<td class="order nowrap center hidden-phone">
							<?php
							$iconClass = '';
							if (!$canChange)
							{
								$iconClass = ' inactive';
							}
							elseif (!$saveOrder)
							{
								$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
							}
							?>
							<span class="sortable-handler<?php echo $iconClass
?>">
								<span class="icon-menu"
aria-hidden="true"></span>
							</span>
							<?php if ($canChange && $saveOrder) : ?>
								<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
							<?php endif; ?>
						</td>
						<td class="center">
							<?php echo JHtml::_('grid.id', $i, $item->id); ?>
						</td>
						<td class="center">
							<div class="btn-group">
								<?php echo JHtml::_('jgrid.published',
$item->state, $i, 'articles.', $canChange, 'cb',
$item->publish_up, $item->publish_down); ?>
								<?php echo JHtml::_('contentadministrator.featured',
$item->featured, $i, $canChange); ?>
								<?php // Create dropdown items and render the dropdown list.
								if ($canChange)
								{
									JHtml::_('actionsdropdown.' . ((int) $item->state ===
2 ? 'un' : '') . 'archive', 'cb' .
$i, 'articles');
									JHtml::_('actionsdropdown.' . ((int) $item->state ===
-2 ? 'un' : '') . 'trash', 'cb' .
$i, 'articles');
									echo JHtml::_('actionsdropdown.render',
$this->escape($item->title));
								}
								?>
							</div>
						</td>
						<td class="has-context">
							<div class="pull-left break-word">
								<?php if ($item->checked_out) : ?>
									<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'articles.',
$canCheckin); ?>
								<?php endif; ?>
								<?php if ($canEdit || $canEditOwn) : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_content&task=article.edit&id='
. $item->id); ?>" title="<?php echo
JText::_('JACTION_EDIT'); ?>">
										<?php echo $this->escape($item->title); ?></a>
								<?php else : ?>
									<span title="<?php echo
JText::sprintf('JFIELD_ALIAS_LABEL',
$this->escape($item->alias)); ?>"><?php echo
$this->escape($item->title); ?></span>
								<?php endif; ?>
								<span class="small break-word">
									<?php if (empty($item->note)) : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
									<?php else : ?>
										<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
									<?php endif; ?>
								</span>
								<div class="small">
									<?php
									$ParentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->parent_category_id . '&extension=com_content');
									$CurrentCatUrl =
JRoute::_('index.php?option=com_categories&task=category.edit&id='
. $item->catid . '&extension=com_content');
									$EditCatTxt = JText::_('COM_CONTENT_EDIT_CATEGORY');

										echo JText::_('JCATEGORY') . ': ';

										if ($item->category_level != '1') :
											if ($item->parent_category_level != '1') :
												echo ' &#187; ';
											endif;
										endif;

										if (JFactory::getLanguage()->isRtl())
										{
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;

											if ($item->category_level != '1') :
												echo ' &#171; ';
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
											endif;
										}
										else
										{
											if ($item->category_level != '1') :
												if ($canEditParCat || $canEditOwnParCat) :
													echo '<a class="hasTooltip"
href="' . $ParentCatUrl . '" title="' .
$EditCatTxt . '">';
												endif;
												echo $this->escape($item->parent_category_title);
												if ($canEditParCat || $canEditOwnParCat) :
													echo '</a>';
												endif;
												echo ' &#187; ';
											endif;
											if ($canEditCat || $canEditOwnCat) :
												echo '<a class="hasTooltip" href="'
. $CurrentCatUrl . '" title="' . $EditCatTxt .
'">';
											endif;
											echo $this->escape($item->category_title);
											if ($canEditCat || $canEditOwnCat) :
												echo '</a>';
											endif;
										}
									?>
								</div>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<?php if ($assoc) : ?>
						<td class="hidden-phone">
							<?php if ($item->association) : ?>
								<?php echo
JHtml::_('contentadministrator.association', $item->id); ?>
							<?php endif; ?>
						</td>
						<?php endif; ?>
						<td class="small hidden-phone">
							<?php if ((int) $item->created_by != 0) : ?>
								<?php if ($item->created_by_alias) : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
									<?php echo $this->escape($item->author_name);
?></a>
									<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
								<?php else : ?>
									<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_users&task=user.edit&id='
. (int) $item->created_by); ?>" title="<?php echo
JText::_('JAUTHOR'); ?>">
									<?php echo $this->escape($item->author_name);
?></a>
								<?php endif; ?>
							<?php else : ?>
								<?php if ($item->created_by_alias) : ?>
									<?php echo JText::_('JNONE'); ?>
									<div class="smallsub"><?php echo
JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->created_by_alias)); ?></div>
								<?php else : ?>
									<?php echo JText::_('JNONE'); ?>
								<?php endif; ?>
							<?php endif; ?>
						</td>
						<td class="small hidden-phone">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php
							$date = $item->{$orderingColumn};
							echo $date > 0 ? JHtml::_('date', $date,
JText::_('DATE_FORMAT_LC4')) : '-';
							?>
						</td>
						<td class="hidden-phone center">
							<span class="badge badge-info">
								<?php echo (int) $item->hits; ?>
							</span>
						</td>
						<?php if ($this->vote) : ?>
							<td class="hidden-phone center">
								<span class="badge badge-success" >
								<?php echo (int) $item->rating_count; ?>
								</span>
							</td>
							<td class="hidden-phone center">
								<span class="badge badge-warning" >
								<?php echo (int) $item->rating; ?>
								</span>
							</td>
						<?php endif; ?>
						<td class="hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php // Load the batch processing form. ?>
			<?php if ($user->authorise('core.create',
'com_content')
				&& $user->authorise('core.edit',
'com_content')
				&& $user->authorise('core.edit.state',
'com_content')) : ?>
				<?php echo JHtml::_(
					'bootstrap.renderModal',
					'collapseModal',
					array(
						'title'  =>
JText::_('COM_CONTENT_BATCH_OPTIONS'),
						'footer' =>
$this->loadTemplate('batch_footer'),
					),
					$this->loadTemplate('batch_body')
				); ?>
			<?php endif; ?>
		<?php endif; ?>

		<?php echo $this->pagination->getListFooter(); ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
PK/��[iӂ��views/articles/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
	<layout title="COM_CONTENT_ARTICLES_VIEW_DEFAULT_TITLE">
		<message>
			<![CDATA[COM_CONTENT_ARTICLES_VIEW_DEFAULT_DESC]]>
		</message>
	</layout>
		<!-- Add fields to the request variables for the layout. -->
	<fields name="request">
		<fieldset name="request"
			addfieldpath="/administrator/components/com_categories/models/fields"
		>
			<field
				name="filter_category_id"
				type="modal_category"
				label="COM_MENUS_ADMIN_CATEGORY_LABEL"
				description="COM_MENUS_ADMIN_CATEGORY_DESC"
				extension="com_content"
				select="true"
				new="true"
				edit="true"
				clear="true"
				filter="integer"
			/>

			<field
				name="filter_level"
				type="integer"
				label="COM_MENUS_ADMIN_LEVEL_LABEL"
				description="COM_MENUS_ADMIN_LEVEL_DESC"
				first="1"
				last="10"
				step="1"
				languages="*"
				filter="integer"
				>
				<option
value="">JOPTION_SELECT_MAX_LEVELS</option>
			</field>

			<field
				name="filter_author_id"
				type="author"
				label="COM_MENUS_ADMIN_AUTHOR_LABEL"
				description="COM_MENUS_ADMIN_AUTHOR_DESC"
				multiple="true"
				class="multipleAuthors"
				filter="int_array"
				>
				<option value="0">JNONE</option>
			</field>

			<field
				name="filter_tag"
				type="tag"
				label="COM_MENUS_ADMIN_TAGS_LABEL"
				description="COM_MENUS_ADMIN_TAGS_DESC"
				multiple="true"
				filter="int_array"
				mode="nested"
			/>

			<field
				name="filter_access"
				type="accesslevel"
				label="COM_MENUS_ADMIN_ACCESS_LABEL"
				description="COM_MENUS_ADMIN_ACCESS_DESC"
				multiple="true"
				filter="int_array"
			/>

			<field
				name="filter_language"
				type="contentlanguage"
				label="COM_MENUS_ADMIN_LANGUAGE_LABEL"
				description="COM_MENUS_ADMIN_LANGUAGE_DESC"
				>
				<option value="">JOPTION_SELECT_LANGUAGE</option>
				<option value="*">JALL</option>
			</field>

		</fieldset>
	</fields>

</metadata>
PK/��[�c���*views/articles/tmpl/default_batch_body.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;
$published = (int) $this->state->get('filter.published');
?>

<div class="container-fluid">
	<div class="row-fluid">
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.language'); ?>
			</div>
		</div>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.access'); ?>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<?php if ($published >= 0) : ?>
			<div class="control-group span6">
				<div class="controls">
					<?php echo JHtml::_('batch.item',
'com_content'); ?>
				</div>
			</div>
		<?php endif; ?>
		<div class="control-group span6">
			<div class="controls">
				<?php echo JHtml::_('batch.tag'); ?>
			</div>
		</div>
	</div>
</div>
PK/��[��00,views/articles/tmpl/default_batch_footer.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

?>
<button type="button" class="btn"
onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-user-id').value='';document.getElementById('batch-tag-id').value=''"
data-dismiss="modal">
	<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success"
onclick="Joomla.submitbutton('article.batch');return
false;">
	<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
PK/��[؂���views/articles/tmpl/modal.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

$app = JFactory::getApplication();

if ($app->isClient('site'))
{
	JSession::checkToken('get') or
die(JText::_('JINVALID_TOKEN'));
}

JLoader::register('ContentHelperRoute', JPATH_ROOT .
'/components/com_content/helpers/route.php');

// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt
IE 9');
JHtml::_('script',
'com_content/admin-articles-modal.min.js',
array('version' => 'auto', 'relative'
=> true));
JHtml::_('bootstrap.tooltip', '.hasTooltip',
array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover',
array('placement' => 'bottom'));
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen',
'.multipleAccessLevels', null,
array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors',
null, array('placeholder_text_multiple' =>
JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
$searchFilterDesc =
$this->filterForm->getFieldAttribute('search',
'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search',
array('title' => JText::_($searchFilterDesc),
'placement' => 'bottom'));

$function  = $app->input->getCmd('function',
'jSelectArticle');
$editor    = $app->input->getCmd('editor', '');
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn  =
$this->escape($this->state->get('list.direction'));
$onclick   = $this->escape($function);

if (!empty($editor))
{
	// This view is used also in com_menus. Load the xtd script only if the
editor is set!
	JFactory::getDocument()->addScriptOptions('xtd-articles',
array('editor' => $editor));
	$onclick = "jSelectArticle";
}
?>
<div class="container-popup">

	<form action="<?php echo
JRoute::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function='
. $function . '&' . JSession::getFormToken() .
'=1&editor=' . $editor); ?>" method="post"
name="adminForm" id="adminForm"
class="form-inline">

		<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>

		<div class="clearfix"></div>

		<?php if (empty($this->items)) : ?>
			<div class="alert alert-no-items">
				<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
			</div>
		<?php else : ?>
			<table class="table table-striped table-condensed">
				<thead>
					<tr>
						<th width="1%" class="center nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
						</th>
						<th class="title">
							<?php echo JHtml::_('searchtools.sort',
'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder);
?>
						</th>
						<th width="10%" class="nowrap
hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'a.access', $listDirn,
$listOrder); ?>
						</th>
						<th width="15%" class="nowrap">
							<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_LANGUAGE', 'language', $listDirn,
$listOrder); ?>
						</th>
						<th width="5%" class="nowrap hidden-phone">
							<?php echo JHtml::_('searchtools.sort',
'JDATE', 'a.created', $listDirn, $listOrder); ?>
						</th>
						<th width="1%" class="nowrap hidden-phone">
						<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder);
?>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
							<?php echo $this->pagination->getListFooter(); ?>
						</td>
					</tr>
				</tfoot>
				<tbody>
				<?php
				$iconStates = array(
					-2 => 'icon-trash',
					0  => 'icon-unpublish',
					1  => 'icon-publish',
					2  => 'icon-archive',
				);
				?>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->language &&
JLanguageMultilang::isEnabled())
					{
						$tag = strlen($item->language);
						if ($tag == 5)
						{
							$lang = substr($item->language, 0, 2);
						}
						elseif ($tag == 6)
						{
							$lang = substr($item->language, 0, 3);
						}
						else {
							$lang = '';
						}
					}
					elseif (!JLanguageMultilang::isEnabled())
					{
						$lang = '';
					}
					?>
					<tr class="row<?php echo $i % 2; ?>">
						<td class="center">
							<span class="<?php echo
$iconStates[$this->escape($item->state)]; ?>"
aria-hidden="true"></span>
						</td>
						<td>
							<?php $attribs = 'data-function="' .
$this->escape($onclick) . '"'
								. ' data-id="' . $item->id . '"'
								. ' data-title="' .
$this->escape($item->title) . '"'
								. ' data-cat-id="' .
$this->escape($item->catid) . '"'
								. ' data-uri="' .
$this->escape(ContentHelperRoute::getArticleRoute($item->id,
$item->catid, $item->language)) . '"'
								. ' data-language="' . $this->escape($lang) .
'"';
							?>
							<a class="select-link"
href="javascript:void(0)" <?php echo $attribs; ?>>
								<?php echo $this->escape($item->title); ?></a>
							<span class="small break-word">
								<?php if (empty($item->note)) : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS',
$this->escape($item->alias)); ?>
								<?php else : ?>
									<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE',
$this->escape($item->alias), $this->escape($item->note)); ?>
								<?php endif; ?>
 							</span>
							<div class="small">
								<?php echo JText::_('JCATEGORY') . ': ' .
$this->escape($item->category_title); ?>
							</div>
						</td>
						<td class="small hidden-phone">
							<?php echo $this->escape($item->access_level); ?>
						</td>
						<td class="small">
							<?php echo
JLayoutHelper::render('joomla.content.language', $item); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo JHtml::_('date', $item->created,
JText::_('DATE_FORMAT_LC4')); ?>
						</td>
						<td class="nowrap small hidden-phone">
							<?php echo (int) $item->id; ?>
						</td>
					</tr>
				<?php endforeach; ?>
				</tbody>
			</table>
		<?php endif; ?>

		<input type="hidden" name="task"
value="" />
		<input type="hidden" name="boxchecked"
value="0" />
		<input type="hidden" name="forcedLanguage"
value="<?php echo
$app->input->get('forcedLanguage', '',
'CMD'); ?>" />
		<?php echo JHtml::_('form.token'); ?>

	</form>
</div>
PK/��[7���views/articles/view.html.phpnu�[���<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of articles.
 *
 * @since  1.6
 */
class ContentViewArticles extends JViewLegacy
{
	/**
	 * The item authors
	 *
	 * @var  stdClass
	 *
	 * @deprecated  4.0  To be removed with Hathor
	 */
	protected $authors;

	/**
	 * An array of items
	 *
	 * @var  array
	 */
	protected $items;

	/**
	 * The pagination object
	 *
	 * @var  JPagination
	 */
	protected $pagination;

	/**
	 * The model state
	 *
	 * @var  object
	 */
	protected $state;

	/**
	 * Form object for search filters
	 *
	 * @var  JForm
	 */
	public $filterForm;

	/**
	 * The active search filters
	 *
	 * @var  array
	 */
	public $activeFilters;

	/**
	 * The sidebar markup
	 *
	 * @var  string
	 */
	protected $sidebar;

	/**
	 * Display the view
	 *
	 * @param   string  $tpl  The name of the template file to parse;
automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise an Error object.
	 */
	public function display($tpl = null)
	{
		if ($this->getLayout() !== 'modal')
		{
			ContentHelper::addSubmenu('articles');
		}

		$this->items         = $this->get('Items');
		$this->pagination    = $this->get('Pagination');
		$this->state         = $this->get('State');
		$this->authors       = $this->get('Authors');
		$this->filterForm    = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
		$this->vote          = JPluginHelper::isEnabled('content',
'vote');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			throw new Exception(implode("\n", $errors), 500);
		}

		// Levels filter - Used in Hathor.
		// @deprecated  4.0 To be removed with Hathor
		$this->f_levels = array(
			JHtml::_('select.option', '1',
JText::_('J1')),
			JHtml::_('select.option', '2',
JText::_('J2')),
			JHtml::_('select.option', '3',
JText::_('J3')),
			JHtml::_('select.option', '4',
JText::_('J4')),
			JHtml::_('select.option', '5',
JText::_('J5')),
			JHtml::_('select.option', '6',
JText::_('J6')),
			JHtml::_('select.option', '7',
JText::_('J7')),
			JHtml::_('select.option', '8',
JText::_('J8')),
			JHtml::_('select.option', '9',
JText::_('J9')),
			JHtml::_('select.option', '10',
JText::_('J10')),
		);

		// We don't need toolbar in the modal window.
		if ($this->getLayout() !== 'modal')
		{
			$this->addToolbar();
			$this->sidebar = JHtmlSidebar::render();
		}
		else
		{
			// In article associations modal we need to remove language filter if
forcing a language.
			// We also need to change the category filter to show show categories
with All or the forced language.
			if ($forcedLanguage =
JFactory::getApplication()->input->get('forcedLanguage',
'', 'CMD'))
			{
				// If the language is forced we can't allow to select the
language, so transform the language selector filter into a hidden field.
				$languageXml = new SimpleXMLElement('<field
name="language" type="hidden" default="' .
$forcedLanguage . '" />');
				$this->filterForm->setField($languageXml, 'filter',
true);

				// Also, unset the active language filter so the search tools is not
open by default with this filter.
				unset($this->activeFilters['language']);

				// One last changes needed is to change the category filter to just
show categories with All language or with the forced language.
				$this->filterForm->setFieldAttribute('category_id',
'language', '*,' . $forcedLanguage,
'filter');
			}
		}

		return parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		$canDo = JHelperContent::getActions('com_content',
'category',
$this->state->get('filter.category_id'));
		$user  = JFactory::getUser();

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'),
'stack article');

		if ($canDo->get('core.create') ||
count($user->getAuthorisedCategories('com_content',
'core.create')) > 0)
		{
			JToolbarHelper::addNew('article.add');
		}

		if ($canDo->get('core.edit') ||
$canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('article.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('articles.publish',
'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('articles.unpublish',
'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::custom('articles.featured',
'featured.png', 'featured_f2.png',
'JFEATURE', true);
			JToolbarHelper::custom('articles.unfeatured',
'unfeatured.png', 'featured_f2.png',
'JUNFEATURE', true);
			JToolbarHelper::archiveList('articles.archive');
			JToolbarHelper::checkin('articles.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create', 'com_content')
			&& $user->authorise('core.edit',
'com_content')
			&& $user->authorise('core.edit.state',
'com_content'))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($this->state->get('filter.published') == -2
&& $canDo->get('core.delete'))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE',
'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('articles.trash');
		}

		if ($user->authorise('core.admin', 'com_content')
|| $user->authorise('core.options', 'com_content'))
		{
			JToolbarHelper::preferences('com_content');
		}

		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
	}

	/**
	 * Returns an array of fields the table can be sorted by
	 *
	 * @return  array  Array containing the field name to sort by as the key
and display text as value
	 *
	 * @since   3.0
	 */
	protected function getSortFields()
	{
		return array(
			'a.ordering'     =>
JText::_('JGRID_HEADING_ORDERING'),
			'a.state'        => JText::_('JSTATUS'),
			'a.title'        => JText::_('JGLOBAL_TITLE'),
			'category_title' => JText::_('JCATEGORY'),
			'access_level'   =>
JText::_('JGRID_HEADING_ACCESS'),
			'a.created_by'   => JText::_('JAUTHOR'),
			'language'       =>
JText::_('JGRID_HEADING_LANGUAGE'),
			'a.created'      => JText::_('JDATE'),
			'a.id'           => JText::_('JGRID_HEADING_ID'),
			'a.featured'     => JText::_('JFEATURED')
		);
	}
}
PK���[�`&?��js/admin-article-pagebreak.jsnu�[���PK���[�h�mmm!js/admin-article-pagebreak.min.jsnu�[���PK���[lWV����js/admin-article-readmore.jsnu�[���PK���[_(zZ��
�js/admin-article-readmore.min.jsnu�[���PK���[��H���js/admin-articles-modal.jsnu�[���PK���[�����js/admin-articles-modal.min.jsnu�[���PK��[Y�I�mm�content.phpnu�[���PK��[���

Y$controller.phpnu�[���PK��[��w�Z'Z'�1controllers/article.phpnu�[���PK��[.�#D��IYhelpers/association.phpnu�[���PK��[Y�I��tjhelpers/category.phpnu�[���PK��[,ne���Bmhelpers/icon.phpnu�[���PK��[���|'|'5�helpers/legacyrouter.phpnu�[���PK��[���#��helpers/query.phpnu�[���PK��[�a3�aaP�helpers/route.phpnu�[���PK��[9ˆP11��models/archive.phpnu�[���PK��[�#���)�)e�models/article.phpnu�[���PK��[a��ܐY�YMmodels/articles.phpnu�[���PK��[��l�
�

qmodels/categories.phpnu�[���PK��[95
�d1d1�~models/category.phpnu�[���PK��[��;xpp��models/featured.phpnu�[���PK��[��O��H�models/form.phpnu�[���PK	��[���""C�models/forms/article.xmlnu�[���PK	��[�����
��models/forms/filter_articles.xmlnu�[���PK	��[�C����
�	router.phpnu�[���PK	��[�+i	�$views/archive/tmpl/default.phpnu�[���PK	��[4��zzJ,views/archive/tmpl/default.xmlnu�[���PK	��[��B�%%$Kviews/archive/tmpl/default_items.phpnu�[���PK	��["��8JJ�pviews/archive/view.html.phpnu�[���PK	��[�
���views/article/tmpl/default.phpnu�[���PK	��[�pLf``[�views/article/tmpl/default.xmlnu�[���PK	��[���

$	�views/article/tmpl/default_links.phpnu�[���PK	��[���(�(j�views/article/view.html.phpnu�[���PK	��[k�D��![�views/categories/tmpl/default.phpnu�[���PK	��[����KK!��views/categories/tmpl/default.xmlnu�[���PK	��[N�Z�
�
'Gviews/categories/tmpl/default_items.phpnu�[���PK	��[�����Rviews/categories/view.html.phpnu�[���PK	��[�i���Tviews/category/tmpl/blog.phpnu�[���PK	��[v/��K�K
lviews/category/tmpl/blog.xmlnu�[���PK	��[&#�
%&�views/category/tmpl/blog_children.phpnu�[���PK	��[j�>LL!��views/category/tmpl/blog_item.phpnu�[���PK	��[��/�//"(�views/category/tmpl/blog_links.phpnu�[���PK	��[MaJ�

��views/category/tmpl/default.phpnu�[���PK	��[���P3E3E�views/category/tmpl/default.xmlnu�[���PK	��[���}�5�5(�!views/category/tmpl/default_articles.phpnu�[���PK	��[�v�X�
�
(�Wviews/category/tmpl/default_children.phpnu�[���PK	��[k�����eviews/category/view.feed.phpnu�[���PK	��[ܟ>����nviews/category/view.html.phpnu�[���PK	��[������views/featured/tmpl/default.phpnu�[���PK	��[��F�D8D8
�views/featured/tmpl/default.xmlnu�[���PK	��[�s�c==$��views/featured/tmpl/default_item.phpnu�[���PK	��[��+((%.�views/featured/tmpl/default_links.phpnu�[���PK	��[��f�
�
��views/featured/view.feed.phpnu�[���PK	��[v������views/featured/view.html.phpnu�[���PK	��[ʳm..�views/form/tmpl/edit.phpnu�[���PK	��[��%Ì�C+views/form/tmpl/edit.xmlnu�[���PK	��[Dv�^GG3views/form/view.html.phpnu�[���PK��[�Ӓpp�Eforms/article.xmlnu�[���PK��[����Waforms/filter_articles.xmlnu�[���PK��[�e��vvRptmpl/article/default.xmlnu�[���PK��[�R(����tmpl/article/default_links.phpnu�[���PK��[��;;�tmpl/article/default.phpnu�[���PK��[F)S*C*Cv�tmpl/categories/default.xmlnu�[���PK��[{��ee!�tmpl/categories/default_items.phpnu�[���PK��[:��vv�tmpl/categories/default.phpnu�[���PK��[����~~btmpl/archive/default.xmlnu�[���PK��[q�|�?3?3(*tmpl/archive/default_items.phpnu�[���PK��[�w��

�]tmpl/archive/default.phpnu�[���PK��[j��2!!htmpl/form/edit.xmlnu�[���PK��[�^�A#A#{otmpl/form/edit.phpnu�[���PK��[�ʑ)H)H��tmpl/category/blog.xmlnu�[���PK��[9���??m�tmpl/category/default.xmlnu�[���PK��[&�*aa"�tmpl/category/default_children.phpnu�[���PK��[*m�DD�+tmpl/category/blog_children.phpnu�[���PK��[4|�Jdd<tmpl/category/blog.phpnu�[���PK��[`�r���Vtmpl/category/blog_links.phpnu�[���PK��[ےR�N�N"�Ytmpl/category/default_articles.phpnu�[���PK��[�>�����tmpl/category/blog_item.phpnu�[���PK��[�������tmpl/category/default.phpnu�[���PK��[�֚I6I6�tmpl/featured/default.xmlnu�[���PK��[䩗�����tmpl/featured/default_item.phpnu�[���PK��[q%�����tmpl/featured/default_links.phpnu�[���PK��[S�GU�	�	�
tmpl/featured/default.phpnu�[���PK��[�ALL�src/Service/Category.phpnu�[���PK��[=VܥN"N"qsrc/Service/Router.phpnu�[���PK��[o����
;src/Helper/AssociationHelper.phpnu�[���PK��[
��iN
N
5Osrc/Helper/RouteHelper.phpnu�[���PK��[�9�����Ysrc/Helper/QueryHelper.phpnu�[���PK��[$�|BBrsrc/Dispatcher/Dispatcher.phpnu�[���PK��[��O����ysrc/Model/CategoriesModel.phpnu�[���PK��[��X*ACAC܊src/Model/ArticleModel.phpnu�[���PK��[�|�ݯ�g�src/Model/FeaturedModel.phpnu�[���PK��[YE��;�;a�src/Model/CategoryModel.phpnu�[���PK��[G���ɋɋ1	src/Model/ArticlesModel.phpnu�[���PK��[�NQ�wwE�	src/Model/ArchiveModel.phpnu�[���PK��[��(�*�*�	src/Model/FormModel.phpnu�[���PK��[�i���0�0$5�	src/Controller/ArticleController.phpnu�[���PK��[����EE$<#
src/Controller/DisplayController.phpnu�[���PK��[��y��
�
�5
src/View/Category/FeedView.phpnu�[���PK��[DO�����@
src/View/Category/HtmlView.phpnu�[���PK��[:c�P22�^
src/View/Article/HtmlView.phpnu�[���PK��[�N0i���
src/View/Archive/HtmlView.phpnu�[���PK��[�ؖ�����
src/View/Featured/FeedView.phpnu�[���PK��[�����ɿ
src/View/Featured/HtmlView.phpnu�[���PK��[_
��CC��
src/View/Form/HtmlView.phpnu�[���PK��[���BB
m�
src/View/Categories/HtmlView.phpnu�[���PK.��[��N-??
��
access.xmlnu�[���PK.��[jd��o�o
xconfig.xmlnu�[���PK.��[��Ƈ��wcontent.xmlnu�[���PK.��[LI{��g}controllers/ajax.json.phpnu�[���PK.��[j�����controllers/articles.phpnu�[���PK.��[���PP��controllers/featured.phpnu�[���PK.��[�A�h�
�
0�helpers/associations.phpnu�[���PK.��[�ד��C�helpers/content.phpnu�[���PK.��[H����%n�helpers/html/contentadministrator.phpnu�[���PK.��[Ce1�����models/feature.phpnu�[���PK.��[Tp?&e&e&��models/fields/modal/article.phpnu�[���PK.��[ɞ�gg��models/fields/voteradio.phpnu�[���PK.��[z��
7�models/forms/filter_featured.xmlnu�[���PK.��[,��RR�tables/featured.phpnu�[���PK/��[�"Z@@views/article/tmpl/edit.phpnu�[���PK/��[�٢XX�$views/article/tmpl/edit.xmlnu�[���PK/��[�]��UU(J&views/article/tmpl/edit_associations.phpnu�[���PK/��[R�K�QQ$�'views/article/tmpl/edit_metadata.phpnu�[���PK/��[��ll�)views/article/tmpl/modal.phpnu�[���PK/��[�]��UU)T/views/article/tmpl/modal_associations.phpnu�[���PK/��[R�K�QQ%1views/article/tmpl/modal_metadata.phpnu�[���PK/��[��k!��
�2views/article/tmpl/pagebreak.phpnu�[���PK/��[��
��8�8�8views/articles/tmpl/default.phpnu�[���PK/��[iӂ���qviews/articles/tmpl/default.xmlnu�[���PK/��[�c���*�yviews/articles/tmpl/default_batch_body.phpnu�[���PK/��[��00,�}views/articles/tmpl/default_batch_footer.phpnu�[���PK/��[؂���g�views/articles/tmpl/modal.phpnu�[���PK/��[7���o�views/articles/view.html.phpnu�[���PK���/��