Новости Joomla

Перевод и публикация интервью на греческом портале Joomla Утро, просматриваешь входящие письма и...

Перевод и публикация интервью на греческом портале Joomla 🇬🇷Утро, просматриваешь входящие письма и изучаешь новости и внезапно обнаруживаешь, что инициатива, которую ты начал, подхватывается другими людьми. 🎉Недавно я взял интервью у Билла (Василиса) Коциаса - руководителя студии, читающего лекции в университете и популяризатора Joomla в Греции.Это интервью из журнала NorrNext, в оригинале на английском, теперь доступно на греческом языке и опубликовано на портале joomla.gr. 🎉До чего же приятно… 😇😊 Работа замечена и с ней посчитали необходимым ознакомить аудиторию страны, в которой Билл читает лекции. И это солнечная Греция - страна, страна, с которой Россию многое связывает. 🇬🇷🇷🇺🕊Смотрю на греческий алфавит и тут же рисуются картины белоснежных зданий в окружении винограда и амфор, красивых женщин в сандалиях и мужественных воинов, охраняющих покой полисов, в которых ученые мужи работают над трудами, позже вошедшими в века. Красиво! 😇Но вернемся к интервью. Из него вы узнаете, что в Греции доля Joomla среди CMS занимает порядка 30-40%. По моему мнению это - самый высокий показатель во всем мире. Также чтение лекций о Joomla в университетах позволит привести новых пользователей и к тому же молодое поколение. Ну и огромное кол-во сертификтатов Билла на стене (смотрим фото в статье) свидетельствует о том, что Joomla может применяться как профессиональный инструмент. 🇬🇷 Интервью на греческом портале (joomla.gr)🌐 Оригинальное интервью (на английском)Что насчет перевода на русский? Увы, времени всего 24 часа в сутках. Я продолжаю готовить новые интервью. Возможно, после завершения выпуска журнала, рассмотрю перевод некоторых интервью на русский. Но я об этом не говорил. 😊 В блоге @eugenius_blog публикую анонсы интересных событий из мира Joomla, интервью, уроки и полезные советы, а также делюсь мыслями:, связанными с разработкой и веб-дизайном.

Обработка HTTP ответа в Joomla 6+. Изменения по сравнению с Joomla 3 - Joomla 5

👩‍💻 Обработка HTTP ответа в Joomla 6+. Изменения по сравнению с Joomla 3 - Joomla 5.В Joomla для выполнения внешних запросов из PHP к сторонним API используется класс Joomla\Http\Http напрямую или же Joomla\Http\HttpFactory, который возвращает для работы преднастроенный по умолчанию класс Http. О работе с HTTP-запросами подробно рассказывалось в статье 2021 года Создание внешних запросов с использованием HttpFactory (Joomla). Некоторые изменения касаются работы с ответами на запросы. Например, наш запрос:
use Joomla\Http\HttpFactory;$http = (new HttpFactory)->getHttp($options, ['curl', 'stream']);$response = $http->get('https://any-url.ru/api/any/endpoint');
Раньше можно было получить код ответа или тело ответа как свойство $response - $response->code или $response->body. Однако, Joomla, начиная с Joomla 4 во многом переходит на стандарты PSR. В частности для работы с HTTP-ответами - на PSR-7. Также хорошая статья на Хабре о PSR-7: PSR-7 в примерах.
Прямое обращение к свойствам code, headers, body объявлено устаревшим в Joomla 6.0.0 и обещают удалить в Joomla 7.0.0.
Вместо этого нужно работать с HTTP-ответом по стандартам PSR-7. Код ответа.Было $response->code. Стало $response->getStatusCode().Заголовки ответа.Было $response->headers. Стало $response->getHeaders().Тело ответа.Было $response->body. Стало (string)$response->getContents().В тело ответа теперь приходит не строка, а поток - объект класса Laminas\Diactoros\Stream. Поэтому его нужно привести к строке (если это json, к примеру): (string)$response->getContents(). Чаще всего в коде Joomla встречается именно такой вариант. Однако, есть и вариант с перемещением указателя чтения на начало потока:
// Получили ответ в виде потока$stream = $response->getBody();// "перемотали" на начало$stream->rewind();// Получили строковый ответ$json = $stream->getContents();
В итоге результат одинаковый.@joomlafeed#joomla #разработка #php

Quantum Manager нужен сообществу, а автору нужна ваша поддержка!

Quantum Manager нужен сообществу, а автору нужна ваша поддержка!Файловый менеджер Quantum — одно...

Файловый менеджер Quantum — одно из самых популярных решений для Joomla, созданное разработчиком из сообщества Joomla, Дмитрием Цымбалом (@tsymbalmitia). Он делает Quantum удобным, безопасным и современным, обновляет его, исправляет уязвимости и отвечает пользователям — всё это в свободное от основной работы время.

Теперь настал момент для следующего шага: развитие проекта требует больше времени и ресурсов.

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

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
вопрос всередине
« : 24.08.2011, 20:15:22 »
Вот наприсовал на картинке что я хочу сделать:

стили подгонять я буду сам , нужно только поставить бреактумбс перед названием.
Вот сайт: magerfon.ru
вот php код файла defalut.php:
Цитировать
<?php // no direct access
defined('_JEXEC') or die('Restricted access');

$canEdit   = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own'));
?>
<?php if ($this->params->get('show_page_title', 1) && $this->params->get('page_title')!= $this->article->title) : ?>
   <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
      <?php echo $this->escape($this->params->get('page_title')); ?>
   </div>
<?php endif; ?>
<?php if ($canEdit || $this->params->get('show_title') || $this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon')) : ?>
<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<tr>
   <?php if ($this->params->get('show_title')) : ?>
   <td class="contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="100%">
      <?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
      <a href="<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
         <?php echo $this->escape($this->article->title); ?></a>
      <?php else : ?>
         <?php echo $this->escape($this->article->title); ?>
      <?php endif; ?>
             <?php if ($this->params->get('link_category') && $this->article->category2) : ?>
            <?php echo ',
            <a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catid2, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape ($this->article->category2); ?>
         <?php if ($this->params->get('link_category') && $this->article->category2) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
            <?php if ($this->params->get('link_category') && $this->article->category3) : ?>
            <?php echo ',
            <a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute ($this->article->catid3, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->category3); ?>
         <?php if ($this->params->get('link_category') && $this->article->category3) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
   </td>
   <?php endif; ?>
   <?php if (!$this->print) : ?>
      <?php if ($this->params->get('show_pdf_icon')) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.pdf',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>

      <?php if ( $this->params->get( 'show_print_icon' )) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.print_popup',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>

      <?php if ($this->params->get('show_email_icon')) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.email',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>
      <?php if ($canEdit) : ?>
      <td align="right" width="100%" class="buttonheading">
         <?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>
   <?php else : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.print_screen',  $this->article, $this->params, $this->access); ?>
      </td>
   <?php endif; ?>
</tr>
</table>
<?php endif; ?>

<?php  if (!$this->params->get('show_intro')) :
   echo $this->article->event->afterDisplayTitle;
endif; ?>
<?php echo $this->article->event->beforeDisplayContent; ?>
<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<?php if (($this->params->get('show_section') && $this->article->sectionid) || ($this->params->get('show_category') && $this->article->catid)) : ?>
<tr>
   <td>
      <?php if ($this->params->get('show_section') && $this->article->sectionid && isset($this->article->section)) : ?>
      <span>
         <?php if ($this->params->get('link_section')) : ?>
            <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->section); ?>
         <?php if ($this->params->get('link_section')) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
            <?php if ($this->params->get('show_category')) : ?>
            <?php echo ' - '; ?>
         <?php endif; ?>
      </span>
      <?php endif; ?>
      <?php if ($this->params->get('show_category') && $this->article->catid) : ?>
      <span>
         <?php if ($this->params->get('link_category')) : ?>
            <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catslug, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->category); ?>
         <?php if ($this->params->get('link_category')) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
      </span>
      <?php endif; ?>
   </td>
</tr>
<?php endif; ?>
<?php if (($this->params->get('show_author')) && ($this->article->author != "")) : ?>
<tr>
   <td valign="top">
      <span class="small">
         <?php JText::printf( 'Written by', ($this->escape($this->article->created_by_alias)? $this->escape($this->article->created_by_alias) : $this->escape($this->article->author)) ); ?>
      </span>
      &nbsp;&nbsp;
   </td>
</tr>
<?php endif; ?>

<?php if ($this->params->get('show_create_date')) : ?>
<tr>
   <td valign="top" class="createdate">
      <?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2'))?>
   </td>
</tr>
<?php endif; ?>

<?php if ($this->params->get('show_url') && $this->article->urls) : ?>
<tr>
   <td valign="top">
      <a href="http://<?php echo $this->article->urls ; ?>" target="_blank">
         <?php echo $this->escape($this->article->urls); ?></a>
   </td>
</tr>
<?php endif; ?>

<tr>
<td valign="top">
<?php if (isset ($this->article->toc)) : ?>
   <?php echo $this->article->toc; ?>
<?php endif; ?>
<?php echo $this->article->text; ?>
</td>
</tr>

<?php if ( intval($this->article->modified)!=0 && $this->params->get('show_modify_date')) : ?>
<tr>
   <td class="modifydate">
      <?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
   </td>
</tr>
<?php endif; ?>
</table>
<span class="article_separator">&nbsp;</span>
<?php echo $this->article->event->afterDisplayContent; ?>
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #1 : 24.08.2011, 20:19:39 »
Именно модуль хлебных крошек нужен? Или просто вывести перед заголовком название раздела и категории?
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #2 : 25.08.2011, 01:56:05 »
Просто вывести перед заголовком название раздела и категории
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #3 : 25.08.2011, 02:36:14 »
Вот так.
Код
<?php // no direct access
defined('_JEXEC') or die('Restricted access');

$canEdit   = ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own'));
?>
<?php if ($this->params->get('show_page_title', 1) && $this->params->get('page_title')!= $this->article->title) : ?>
   <div class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
      <?php echo $this->escape($this->params->get('page_title')); ?>
   </div>
<?php endif; ?>
<?php if ($canEdit || $this->params->get('show_title') || $this->params->get('show_pdf_icon') || $this->params->get('show_print_icon') || $this->params->get('show_email_icon')) : ?>
<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<tr>
   <?php if ($this->params->get('show_title')) : ?>
   <td class="contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="100%">
<?php if (($this->params->get('show_section') && $this->article->sectionid) || ($this->params->get('show_category') && $this->article->catid)) : ?>

      <?php if ($this->params->get('show_section') && $this->article->sectionid && isset($this->article->section)) : ?>
      <span>
         <?php if ($this->params->get('link_section')) : ?>
            <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->section); ?>
         <?php if ($this->params->get('link_section')) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
            <?php if ($this->params->get('show_category')) : ?>
            <?php echo ' - '; ?>
         <?php endif; ?>
      </span>
      <?php endif; ?>
      <?php if ($this->params->get('show_category') && $this->article->catid) : ?>
      <span>
         <?php if ($this->params->get('link_category')) : ?>
            <?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catslug, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->category); ?>
         <?php if ($this->params->get('link_category')) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
      </span>
      <?php endif; ?>
   <?php endif; ?> <?php echo ' - '; ?>
      <?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
      <a href="<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
         <?php echo $this->escape($this->article->title); ?></a>
      <?php else : ?>
         <?php echo $this->escape($this->article->title); ?>
      <?php endif; ?>
             <?php if ($this->params->get('link_category') && $this->article->category2) : ?>
            <?php echo ',
            <a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->article->catid2, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape ($this->article->category2); ?>
         <?php if ($this->params->get('link_category') && $this->article->category2) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
            <?php if ($this->params->get('link_category') && $this->article->category3) : ?>
            <?php echo ',
            <a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute ($this->article->catid3, $this->article->sectionid)).'">'; ?>
         <?php endif; ?>
         <?php echo $this->escape($this->article->category3); ?>
         <?php if ($this->params->get('link_category') && $this->article->category3) : ?>
            <?php echo '</a>'; ?>
         <?php endif; ?>
   </td>
   <?php endif; ?>
   <?php if (!$this->print) : ?>
      <?php if ($this->params->get('show_pdf_icon')) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.pdf',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>

      <?php if ( $this->params->get( 'show_print_icon' )) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.print_popup',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>

      <?php if ($this->params->get('show_email_icon')) : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.email',  $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>
      <?php if ($canEdit) : ?>
      <td align="right" width="100%" class="buttonheading">
         <?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
      </td>
      <?php endif; ?>
   <?php else : ?>
      <td align="right" width="100%" class="buttonheading">
      <?php echo JHTML::_('icon.print_screen',  $this->article, $this->params, $this->access); ?>
      </td>
   <?php endif; ?>
</tr>
</table>
<?php endif; ?>

<?php  if (!$this->params->get('show_intro')) :
   echo $this->article->event->afterDisplayTitle;
endif; ?>
<?php echo $this->article->event->beforeDisplayContent; ?>
<table class="contentpaneopen<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">


<?php if (($this->params->get('show_author')) && ($this->article->author != "")) : ?>
<tr>
   <td valign="top">
      <span class="small">
         <?php JText::printf( 'Written by', ($this->escape($this->article->created_by_alias)? $this->escape($this->article->created_by_alias) : $this->escape($this->article->author)) ); ?>
      </span>
      &nbsp;&nbsp;
   </td>
</tr>
<?php endif; ?>

<?php if ($this->params->get('show_create_date')) : ?>
<tr>
   <td valign="top" class="createdate">
      <?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2'))?>
   </td>
</tr>
<?php endif; ?>

<?php if ($this->params->get('show_url') && $this->article->urls) : ?>
<tr>
   <td valign="top">
      <a href="http://<?php echo $this->article->urls ; ?>" target="_blank">
         <?php echo $this->escape($this->article->urls); ?></a>
   </td>
</tr>
<?php endif; ?>

<tr>
<td valign="top">
<?php if (isset ($this->article->toc)) : ?>
   <?php echo $this->article->toc; ?>
<?php endif; ?>
<?php echo $this->article->text; ?>
</td>
</tr>

<?php if ( intval($this->article->modified)!=0 && $this->params->get('show_modify_date')) : ?>
<tr>
   <td class="modifydate">
      <?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
   </td>
</tr>
<?php endif; ?>
</table>
<span class="article_separator">&nbsp;</span>
<?php echo $this->article->event->afterDisplayContent; ?>
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #4 : 27.08.2011, 13:14:33 »
Скажіте мне еше где етот файл defalut.php найти? ато заплутался
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #5 : 27.08.2011, 13:16:03 »
шаблон/html/com_content/article
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #6 : 27.08.2011, 13:40:59 »
нету такого
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #7 : 27.08.2011, 14:33:52 »
Цитировать
нету такого
Можна создать. Или components\com_content\views\article\tmpl\
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #8 : 27.08.2011, 15:10:44 »
так как было так и осталось:
сами смотрите:
http://magerfon.ru/
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #9 : 27.08.2011, 15:18:51 »
Работает. Но этот файл отвечает за вывод полной статьи. А вам нужно где?
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #10 : 27.08.2011, 15:37:25 »
мне нужно для неполной статьи
*

Efanych

  • Глобальный модератор
  • 4683
  • 644 / 0
  • Меняю свою жизнь на 360°!
Re: вопрос всередине
« Ответ #11 : 27.08.2011, 15:40:21 »
мне нужно для неполной статьи
Неполная статья может быть в блоге категории, блоге раздела и на главной...
Создание сайтов, шаблонов, помощь в решении проблем.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #12 : 29.08.2011, 00:31:35 »
спс, но надо чтоб еще и для остальных файлов такиеже фитчи сделали.
*

andriy465

  • Захожу иногда
  • 67
  • 0 / 0
  • magerfon.ru
Re: вопрос всередине
« Ответ #13 : 31.08.2011, 18:32:27 »
а для остальных?
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Вопрос при переходе на https/ Проблема с внутренними ссылками

Автор krot

Ответов: 4
Просмотров: 2120
Последний ответ 06.02.2018, 09:21:33
от krot
Вопрос о правильности разметки тегами на странице

Автор dpy1995

Ответов: 10
Просмотров: 6412
Последний ответ 09.01.2018, 12:49:25
от kungurskiy
вопрос по использованию FireBug

Автор rkorkin

Ответов: 5
Просмотров: 4037
Последний ответ 06.08.2016, 17:34:23
от Saltanat
Вопрос по Joomla Platform 12.2.0 Stable

Автор ator1812

Ответов: 0
Просмотров: 1606
Последний ответ 12.07.2015, 21:51:55
от ator1812
Вопрос по геотаргетингу

Автор TrollGuru

Ответов: 1
Просмотров: 1371
Последний ответ 21.10.2014, 17:43:40
от voland