Нужно добавить BB-код
denpis 23.03.2014 Стол заказов 2295 4 комментария
В админ. панели выглядит так [col] Любой текст [/col], а на сайте
Оплата: 300р.
Icq: 631 853 676
Любой текст
Оплата: 300р.
Icq: 631 853 676
denpis 23.03.2014 Стол заказов 2295 4 комментария
Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home/imha/web/imha.ru/public_html/engine/modules/show.short.php:666 Stack trace: #0 /home/imha/web/imha.ru/public_html/engine/modules/show.short.php(666): explode(',', Array) #1 /home/imha/web/imha.ru/public_html/engine/engine.php(1167): include_once('/home/imha/web/...') #2 /home/imha/web/imha.ru/public_html/engine/init.php(1036): include_once('/home/imha/web/...') #3 /home/imha/web/imha.ru/public_html/index.php(19): require_once('/home/imha/web/...') #4 {main} thrown in /home/imha/web/imha.ru/public_html/engine/modules/show.short.php on line 666 Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home/imha/web/imha.ru/public_html/engine/modules/show.full.php:1265 Stack trace: #0 /home/imha/web/imha.ru/public_html/engine/modules/show.full.php(1265): explode(',', Array) #1 /home/imha/web/imha.ru/public_html/engine/engine.php(956): include_once('/home/imha/web/...') #2 /home/imha/web/imha.ru/public_html/engine/init.php(1036): include_once('/home/imha/web/...') #3 /home/imha/web/imha.ru/public_html/index.php(19): require_once('/home/imha/web/...') #4 {main} thrown in /home/imha/web/imha.ru/public_html/engine/modules/show.full.php on line 1265
DLEXFields::Compile($row, $tpl, $xfields_in_news, $all_xf_content);if (strpos($tpl->copy_template, '[first-match]') !== false) {
$tags = array_flip(array_filter(array_map(fn($v) => dle_strtolower(trim($v)), explode(',', $row['tags'] ?? ''))));
$tpl->copy_template = preg_replace_callback('~\[first-match\](.*?)\[/first-match\]~is', function($m) use ($tags) {
preg_match_all('~\[if\s+tags=["\']([^"\']+)["\']\](.*?)\[/if\]~is', $m[1], $ifs, PREG_SET_ORDER);
foreach ($ifs as $if)
foreach (explode(',', $if[1]) as $tag)
if (isset($tags[dle_strtolower(trim($tag))])) return $if[2];
return '';
}, $tpl->copy_template);
}[first-match]
[if tags="tag1"]Картинка 1[/if]
[if tags="tag2"]Картинка 2[/if]
[if tags="tag3"]Картинка 3[/if]
[/first-match]
[if field = "tags"]
