primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @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="search<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1 class="page-title">
<?php if ($this->escape($this->params->get('page_heading'))) : ?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php if ($this->error == null && count($this->results) > 0) : ?>
<?php echo $this->loadTemplate('results'); ?>
<?php else : ?>
<?php echo $this->loadTemplate('error'); ?>
<?php endif; ?>
</div>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_SEARCH_SEARCH_VIEW_DEFAULT_TITLE" option="COM_SEARCH_SEARCH_VIEW_DEFAULT_OPTION">
<help
key = "JHELP_MENUS_MENU_ITEM_SEARCH_RESULTS"
/>
<message>
<![CDATA[COM_SEARCH_SEARCH_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request" label="COM_SEARCH_FIELDSET_OPTIONAL_LABEL">
<field
name="searchword"
type="text"
label="COM_SEARCH_FIELD_LABEL"
description="COM_SEARCH_FIELD_DESC"
/>
</fieldset>
</fields>
<!-- Add fields to the parameters object for the layout. -->
<fields name="params">
<!-- Basic options. -->
<fieldset name="basic" label="COM_MENUS_BASIC_FIELDSET_LABEL">
<field
name="search_phrases"
type="list"
label="COM_SEARCH_FIELD_SEARCH_PHRASES_LABEL"
description="COM_SEARCH_FIELD_SEARCH_PHRASES_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="search_areas"
type="list"
label="COM_SEARCH_FIELD_SEARCH_AREAS_LABEL"
description="COM_SEARCH_FIELD_SEARCH_AREAS_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_date"
type="list"
label="COM_SEARCH_CONFIG_FIELD_CREATED_DATE_LABEL"
description="COM_SEARCH_CONFIG_FIELD_CREATED_DATE_DESC"
useglobal="true"
class="chzn-color"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="spacer1"
type="spacer"
label="COM_SEARCH_SAVED_SEARCH_OPTIONS"
class="text"
/>
<!-- Add fields to define saved search. -->
<field
name="searchphrase"
type="list"
label="COM_SEARCH_FOR_LABEL"
description="COM_SEARCH_FOR_DESC"
default="0"
>
<option value="0">COM_SEARCH_ALL_WORDS</option>
<option value="1">COM_SEARCH_ANY_WORDS</option>
<option value="2">COM_SEARCH_EXACT_PHRASE</option>
</field>
<field
name="ordering"
type="list"
label="COM_SEARCH_ORDERING_LABEL"
description="COM_SEARCH_ORDERING_DESC"
default="newest"
>
<option value="newest">COM_SEARCH_NEWEST_FIRST</option>
<option value="oldest">COM_SEARCH_OLDEST_FIRST</option>
<option value="popular">COM_SEARCH_MOST_POPULAR</option>
<option value="alpha">COM_SEARCH_ALPHABETICAL</option>
<option value="category">JCATEGORY</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,17 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @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;
?>
<?php if ($this->error) : ?>
<div class="error">
<?php echo $this->escape($this->error); ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,83 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @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;
JHtml::_('bootstrap.tooltip');
$lang = JFactory::getLanguage();
$upper_limit = $lang->getUpperLimitSearchWord();
?>
<form id="searchForm" action="<?php echo JRoute::_('index.php?option=com_search'); ?>" method="post">
<div class="btn-toolbar">
<div class="btn-group pull-left">
<label for="search-searchword" class="element-invisible">
<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>
</label>
<input type="text" name="searchword" title="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" placeholder="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" id="search-searchword" size="30" maxlength="<?php echo $upper_limit; ?>" value="<?php echo $this->escape($this->origkeyword); ?>" class="inputbox" />
</div>
<div class="btn-group pull-left">
<button name="Search" onclick="this.form.submit()" class="btn hasTooltip" title="<?php echo JHtml::_('tooltipText', 'COM_SEARCH_SEARCH');?>">
<span class="icon-search"></span>
<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>
</button>
</div>
<input type="hidden" name="task" value="search" />
<div class="clearfix"></div>
</div>
<div class="searchintro<?php echo $this->params->get('pageclass_sfx', ''); ?>">
<?php if (!empty($this->searchword)) : ?>
<p>
<?php echo JText::plural('COM_SEARCH_SEARCH_KEYWORD_N_RESULTS', '<span class="badge badge-info">' . $this->total . '</span>'); ?>
</p>
<?php endif; ?>
</div>
<?php if ($this->params->get('search_phrases', 1)) : ?>
<fieldset class="phrases">
<legend>
<?php echo JText::_('COM_SEARCH_FOR'); ?>
</legend>
<div class="phrases-box">
<?php echo $this->lists['searchphrase']; ?>
</div>
<div class="ordering-box">
<label for="ordering" class="ordering">
<?php echo JText::_('COM_SEARCH_ORDERING'); ?>
</label>
<?php echo $this->lists['ordering']; ?>
</div>
</fieldset>
<?php endif; ?>
<?php if ($this->params->get('search_areas', 1)) : ?>
<fieldset class="only">
<legend>
<?php echo JText::_('COM_SEARCH_SEARCH_ONLY'); ?>
</legend>
<?php foreach ($this->searchareas['search'] as $val => $txt) : ?>
<?php $checked = is_array($this->searchareas['active']) && in_array($val, $this->searchareas['active']) ? 'checked="checked"' : ''; ?>
<label for="area-<?php echo $val; ?>" class="checkbox">
<input type="checkbox" name="areas[]" value="<?php echo $val; ?>" id="area-<?php echo $val; ?>" <?php echo $checked; ?> />
<?php echo JText::_($txt); ?>
</label>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php if ($this->total > 0) : ?>
<div class="form-limit">
<label for="limit">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
</label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<p class="counter">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
</form>

View File

@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @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;
?>
<dl class="search-results<?php echo $this->pageclass_sfx; ?>">
<?php foreach ($this->results as $result) : ?>
<dt class="result-title">
<?php echo $this->pagination->limitstart + $result->count . '. '; ?>
<?php if ($result->href) : ?>
<a href="<?php echo JRoute::_($result->href); ?>"<?php if ($result->browsernav == 1) : ?> target="_blank"<?php endif; ?>>
<?php // $result->title should not be escaped in this case, as it may ?>
<?php // contain span HTML tags wrapping the searched terms, if present ?>
<?php // in the title. ?>
<?php echo $result->title; ?>
</a>
<?php else : ?>
<?php // see above comment: do not escape $result->title ?>
<?php echo $result->title; ?>
<?php endif; ?>
</dt>
<?php if ($result->section) : ?>
<dd class="result-category">
<span class="small<?php echo $this->pageclass_sfx; ?>">
(<?php echo $this->escape($result->section); ?>)
</span>
</dd>
<?php endif; ?>
<dd class="result-text">
<?php echo $result->text; ?>
</dd>
<?php if ($this->params->get('show_date')) : ?>
<dd class="result-created<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::sprintf('JGLOBAL_CREATED_DATE_ON', $result->created); ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>