Merge branch 'ent-13737-modo-interpretar-enlaces' into 'develop'

Ent 13737 modo interpretar enlaces

See merge request artica/pandorafms!7405
This commit is contained in:
Enrique Martin 2024-05-28 17:49:15 +00:00
commit aff3726269
3 changed files with 38 additions and 28 deletions

View File

@ -5362,8 +5362,11 @@ function events_page_comments($event, $groupedComments=[], $filter=null)
'<br><br><i>%s</i>',
date($config['date_format'], $comm['utimestamp'])
);
$data[1] = '<p class="break_word">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $comm['comment'])).'</p>';
if (isset($config['events_format_urls']) === true && (bool) $config['events_format_urls'] === true) {
$data[1] = io_safe_output($comm['comment']);
} else {
$data[1] = '<p class="break_word">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $comm['comment'])).'</p>';
}
$table_comments->data[] = $data;
}

View File

@ -7270,24 +7270,27 @@ function ui_print_comments($comment, $truncate_limit=255)
$short_comment = substr($comment['comment'], 0, 20);
$comentario = $comment['comment'];
if (isset($config['events_format_urls']) === true && (bool) $config['events_format_urls'] === true) {
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
} else {
if (strlen($comentario) >= $truncate_limit) {
$comentario = ui_print_truncate_text(
$comentario,
$truncate_limit,
false,
true,
false,
'&hellip;',
true,
true,
);
}
if (strlen($comentario) >= $truncate_limit) {
$comentario = ui_print_truncate_text(
$comentario,
$truncate_limit,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$comment['comment'].'';
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).'&nbsp;('.$comment['id_user'].'):&nbsp;'.$short_comment.'...';
}
}
return $comentario;

View File

@ -560,16 +560,20 @@ if (is_ajax() === true) {
}
if (empty($tmp->event_custom_id) === false) {
$tmp->event_custom_id = ui_print_truncate_text(
$tmp->event_custom_id,
30,
false,
true,
false,
'&hellip;',
true,
true,
);
if (isset($config['events_format_urls']) === true && (bool) $config['events_format_urls'] === true) {
$tmp->event_custom_id = io_safe_output($tmp->event_custom_id);
} else {
$tmp->event_custom_id = ui_print_truncate_text(
$tmp->event_custom_id,
30,
false,
true,
false,
'&hellip;',
true,
true,
);
}
}
if (empty($tmp->module_custom_id) === false) {