Новости Joomla

Новый способ добавления и рендера полей в Joomla Form - метод renderControlFields() (Joomla 5.3+)

Новый способ добавления и рендера полей в Joomla Form - метод renderControlFields() (Joomla 5.3+)

Новый способ добавления и рендера полей в Joomla Form - метод renderControlFields() (Joomla 5.3+). При отображении форм компонента в админке раньше разработчикам нужно было описывать скрытые поля в лейаутах. И выглядело это так:

<?php     // Это файл в /layouts/components/com_component/your_layout.php?><input type="hidden" name="task" value=""><input type="hidden" name="return" value="<?php echo $input->getBase64('return'); ?>"><input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>"><?php echo HTMLHelper::_('form.token'); ?>
Начиная с Joomla 5.3 добавлен новый способ добавления таких полей (их называют control fields) - программно. И теперь это можно сделать просто в Controller / View.
// В Controller/View добавляем поля$this->form  ->addControlField('task', '')  ->addControlField('return', $input->getBase64('return', ''))  ->addControlField('forcedLanguage', $forcedLanguage);
А в layout'е просто используем метод
renderControlFields()
// В layout формыecho $this->form->renderControlFields();
Многие компоненты ядра уже используют этот подход. Соответствующий PR был принят в Joomla 5.3 осенью 2024г.Смотреть
Pull Request@joomlafeed#joomla #разработка #php

JoomGallery 4.1.0 - компонент галереи изображений для Joomla

JoomGallery 4.1.0 - компонент галереи изображений для Joomla

Новая итерация компонента продолжает развиваться, ведь с v.4.x компонент был переписан практически с нуля.

v.4.1.0. Что нового?

Редактирование метаданных изображений. Теперь метаданные можно не только читать, но и напрямую редактировать и записывать обратно в изображение JPG. Поддерживаются данные EXIF ​​и IPTC.

Полная совместимость с Joomla! 4.x, 5.x и 6.x. Компонент почистили от устаревших методов в коде.

Заметно ускорили загрузку больших галерей. Списки в админке, особенно для очень больших галерей ( >30 000 изображений), теперь загружаются значительно быстрее.

Несколько сеток lightGallery на одной странице. Будь то плагины контента или модули изображений: теперь вы можете отображать несколько галерей или категорий на одной странице без каких-либо ограничений.

Множество мелких исправлений ошибок и оптимизаций.

Сайт проекта

GitHub расширения

Скачать

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

yasna

  • Захожу иногда
  • 64
  • 0 / 0
Joomla версия Joomla! 3.7.4 написано в админ панеле обновитесь до новой версии PHP (рекомендуется PHP 7.x). Пошла на хост 1гб перевела на UNIX / Apache PHP - 7.0 (mod_php), прошло 2 дня, и на сайте появился вот такой код
Код
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxPageView has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 21 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxPage15 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 208 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxPage16 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 295 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentView has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 391 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContent15 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 467 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContent16 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 506 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentGeneralArticleView has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 547 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentArticleView15 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 868 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentArticleView16 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 974 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentFrontpageItemView15 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 1131 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ArtxContentFeaturedItemView16 has a deprecated constructor in /home/virtwww/w_yasnatour-com-ua_77e4d9b3/http/templates/jm_kretivz/functions.php on line 1257
Обратилась на хост, сказали попробовать сделать откат, но к сожалению архивной копии не оказалось( вопрос почему, так и остался вопросом), опять на хост- говорят " Скорее всего вам с версией РНР нужно откатиться обратно, так как ваш сайт не готов к работе на РНР 7.0", вернула на 5.6, но не архивы не появляются, ни код не пропал. Я "чайник" у которого нет денег платить специалистам, поэтому я тут. Помогите, если кто знает что с этим делать.
*

draff

  • Гуру
  • 5801
  • 434 / 7
  • ищу работу
Да это минута делов )) Переименовать метод с именем как у класса в __construct
http://php.net/construct
*

yasna

  • Захожу иногда
  • 64
  • 0 / 0
Да это минута делов )) Переименовать метод с именем как у класса в __construct
http://php.net/construct
Спасибо
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Проблема с адаптацией

Автор Leo1986

Ответов: 1
Просмотров: 431
Последний ответ 22.05.2025, 20:30:25
от Leo1986
Проблема с плагином News Show gk5

Автор Evgeniy

Ответов: 4
Просмотров: 784
Последний ответ 27.03.2025, 05:38:57
от R31rus
Проблема со входом в панель администратора Joomla 3.x после обновления

Автор danieeljose

Ответов: 2
Просмотров: 865
Последний ответ 24.03.2025, 20:33:02
от R31rus
Переход на страницу материала после его размещения пользователем

Автор stepan39

Ответов: 0
Просмотров: 651
Последний ответ 22.11.2024, 07:14:15
от stepan39
Проблема с меню

Автор denis_4

Ответов: 6
Просмотров: 1180
Последний ответ 07.08.2024, 14:00:43
от denis_4