__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
/**
 * @copyright	Copyright (C) 2011 Simplify Your Web, Inc. All rights reserved.
 * @license		GNU General Public License version 3 or later; see LICENSE.txt
 */

namespace SYW\Library\Field;

defined('_JEXEC') or die;

use Joomla\CMS\Form\Field\ListField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;
use Joomla\Database\Exception\ExecutionFailureException;
use SYW\Library\K2 as SYWK2;

class K2tagsField extends ListField
{
	public $type = 'K2tags';

	/* hide category selection if no k2 */
	public function getLabel()
	{
		if (SYWK2::exists()) {
			return parent::getLabel();
		}

		return '';
	}

	protected function getInput()
	{
		$html = '';

		if (SYWK2::exists()) {
			return parent::getInput();
		} else {
			$lang = Factory::getLanguage();
			$lang->load('lib_syw.sys', JPATH_SITE);

			$html .= '<div style="margin: 0" class="alert alert-danger">';
				$html .= '<span>'.Text::_('LIB_SYW_K2TAGS_MISSING').'</span>';
			$html .= '</div>';
		}

		return $html;
	}

	protected function getOptions()
	{
		$options = array();

		if (SYWK2::exists()) {

			$db = Factory::getDBO();
			$query = $db->getQuery(true);

			$query->select('a.*');
			$query->from('#__k2_tags a');
 			$query->where('a.published = 1');

			$db->setQuery($query);

			try {
				$items = $db->loadObjectList();

				foreach ($items as $item) {
					$options[] = HTMLHelper::_('select.option', $item->id, $item->name);
				}
			} catch (ExecutionFailureException $e) {
				//return false;
			}
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(parent::getOptions(), $options);

		return $options;
	}

}

Filemanager

Name Type Size Permission Actions
CustomfieldgroupslistField.php File 2.47 KB 0664
CustomfieldslistField.php File 3.77 KB 0664
DemotestField.php File 1.26 KB 0664
DynamicsingleselectField.php File 8.97 KB 0664
ExtensionauthorField.php File 1.08 KB 0664
ExtensionconnectField.php File 1.98 KB 0664
ExtensionlinkField.php File 5.96 KB 0664
ExtensionlinksField.php File 5.44 KB 0664
ExtensiontranslatorsField.php File 1.25 KB 0664
ExtensionversionField.php File 2.12 KB 0664
GdtestField.php File 3.34 KB 0664
GlobalgroupedlistField.php File 2.17 KB 0664
ImagelibraryselectField.php File 1.27 KB 0664
ImagelibrarytestField.php File 6.95 KB 0664
ImagelinkField.php File 2 KB 0664
ImageradioField.php File 6.68 KB 0664
ImagetypeselectField.php File 1.83 KB 0664
K2categoryField.php File 2.36 KB 0664
K2itemField.php File 3.93 KB 0664
K2messageField.php File 1.45 KB 0664
K2tagsField.php File 1.63 KB 0664
MessageField.php File 3.87 KB 0664
OrField.php File 627 B 0664
OverridestestField.php File 6.39 KB 0664
PhpextensiontestField.php File 1.78 KB 0664
PhpsettingtestField.php File 1.7 KB 0664
SubtitleField.php File 1.15 KB 0664
SywalignmentselectField.php File 4.46 KB 0664
SywcardinaltextField.php File 7.58 KB 0664
SywcolorpickerField.php File 14.45 KB 0664
SywextensionpresencetestField.php File 4.91 KB 0664
SywfontpickerField.php File 9.05 KB 0664
SywfontweightpickerField.php File 2.8 KB 0664
SywiconpickerField.php File 31.42 KB 0664
SywimagefileField.php File 3.58 KB 0664
SywimagefilepreviewField.php File 7.92 KB 0664
SywimagefilterpickerField.php File 4.53 KB 0664
SywimagepreviewField.php File 2.14 KB 0664
SywlayoutselectField.php File 2.93 KB 0664
SywloaderpickerField.php File 1.43 KB 0664
SywonlinehelpField.php File 2.26 KB 0664
SywprefixedtextField.php File 2.53 KB 0664
SywshadowselectField.php File 3.09 KB 0664
SywspacingselectField.php File 3.32 KB 0664
SywtransitionpickerField.php File 14.17 KB 0664
SywuniversaliconpickerField.php File 25.9 KB 0664
SywverbosetextField.php File 4.59 KB 0664
SywverbosetextunitsField.php File 5.99 KB 0664
TagsField.php File 2.29 KB 0664
TitleField.php File 2.03 KB 0664
ViewsField.php File 3.79 KB 0664
Filemanager