Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 1 Ответов
  • 952 Просмотров
*

noggano77777

  • Новичок
  • 9
  • 0 / 0
Чистил сайт отшелов и видимо перелопатил где то код.

С админки открываю Basic settings в шаблоне, а там вот такая картина:

Цитировать
defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); class JFormFieldTranslations extends JFormField { protected $type = 'Translations'; protected function getInput() { $html = ''; return $html; } } ?> defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); class JFormFieldAsset extends JFormField { protected $type = 'Asset'; protected function getInput() { $doc = JFactory::getDocument(); if($this->element['extension'] == 'js') { $doc->addScript(JURI::root().$this->element['path']); } else { $doc->addStyleSheet(JURI::root().$this->element['path']); } return; } } /* EOF */ defined('JPATH_BASE') or die; jimport('joomla.form.formfield'); class JFormFieldConfigManager extends JFormField { protected $type = 'ConfigManager'; protected function getInput() { jimport('joomla.filesystem.file'); // necessary Joomla! classes $uri = JURI::getInstance(); $db = JFactory::getDBO(); // variables from URL $tpl_id = $uri->getVar('id', 'none'); $task = $uri->getVar('gk_template_task', 'none'); $file = $uri->getVar('gk_template_file', 'none'); $base_path = str_replace('admin/elements', '', dirname(__FILE__)).'config/'; // helping variables $msg = ''; // if the URL contains proper variables if($tpl_id !== 'none' && is_numeric($tpl_id) && $task !== 'none') { if($task == 'load') { if(JFile::exists($base_path . $file)) { // $query = ' UPDATE #__template_styles SET params = '.$db->quote(file_get_contents($base_path . $file)).' WHERE id = '.$tpl_id.' LIMIT 1 '; // Executing SQL Query $db->setQuery($query); $result = $db->query(); // check the result if($result) { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_LOADED_AND_SAVED').'
'; } else { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_SQL_ERROR').'
'; } } else { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_SELECTED_FILE_DOESNT_EXIST').'
'; } } else if($task == 'save') { if($file == '') { $file = date('d_m_Y_h_s'); } // variable used to detect if the specified file exists $i = 0; // check if the file to save doesn't exist if(JFile::exists($base_path . $file . '.json')) { // find the proper name for the file by incrementing $i = 1; while(JFile::exists($base_path . $file . $i . '.json')) { $i++; } } // get the settings from the database $query = ' SELECT params AS params FROM #__template_styles WHERE id = '.$tpl_id.' LIMIT 1 '; // Executing SQL Query $db->setQuery($query); $row = $db->loadObject(); // write it if(JFile::write($base_path . $file . (($i != 0)? $i : ''). '.json' , $row->params)) { if($i == 0) { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_FILE_SAVED_AS'). ' '. $file .'.json
'; } else { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_FILE_SAVED_AS'). ' '. $file . $i .'.json
'; } } else { $msg = '
'.JText::_('TPL_GK_LANG_CONFIG_FILE_WASNT_SAVED_PLEASE_CHECK_PERM').'
'; } } } // generate the select list $options = (array) $this->getOptions(); $file_select = JHtml::_('select.genericlist', $options, 'name', '', 'value', 'text', 'default', 'config_manager_load_filename'); // return the standard formfield output $html = ''; $html .= '

И весь код виден.

Видимо где то переборщил с удалением ВП

Спецы по Joomla помогите найти файлы для правки. Бэкап сайта есть
*

Fedor Vlasenko

  • Живу я здесь
  • 3845
  • 733 / 7
  • https://fedor-vlasenko.web.app
Если не правили основные компоненты, залейте Joomla из дистрибутива поверху
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Убрать уровни подкатегорий в меню

Автор desaund1

Ответов: 0
Просмотров: 1051
Последний ответ 10.08.2017, 22:34:06
от desaund1
Изменить форму на главной ?

Автор warlocksp

Ответов: 2
Просмотров: 924
Последний ответ 19.02.2017, 15:44:11
от warlocksp
Дублирование на сайте

Автор derenikp

Ответов: 3
Просмотров: 1037
Последний ответ 08.01.2017, 17:30:00
от derenikp
Переменная в ссылках.Не выполняется задаm

Автор ghostcom

Ответов: 25
Просмотров: 1264
Последний ответ 06.09.2016, 17:13:20
от ghostcom
ошибка "File for Model inventory not found"

Автор polgrig

Ответов: 0
Просмотров: 1094
Последний ответ 05.08.2016, 14:36:02
от polgrig