Use word-break: break-all in guilds description + character comment

This commit is contained in:
slawkens 2024-02-16 20:39:40 +01:00
parent 7469be6efb
commit 191ad25eb2
6 changed files with 8 additions and 8 deletions

View File

@ -400,7 +400,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
'rank' => isset($guild_name) ? $rank_of_player->getName() : null,
'link' => isset($guild_name) ? getGuildLink($guild_name) : null
),
'comment' => !empty($comment) ? wordwrap(nl2br($comment), 60, "<br/>", true) : null,
'comment' => !empty($comment) ? nl2br($comment) : null,
'skills' => isset($skills) ? $skills : null,
'quests_enabled' => $quests_enabled,
'quests' => isset($quests) ? $quests : null,

View File

@ -25,7 +25,7 @@ if(count($guilds_list) > 0)
$description = $guild->getCustomField('description');
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
if ($count < $config['guild_description_lines_limit'])
$description = wordwrap(nl2br($description), 60, "<br />", true);
$description = nl2br($description);
$guildName = $guild->getName();
$guilds[] = array('name' => $guildName, 'logo' => $guild_logo, 'link' => getGuildLink($guildName, false), 'description' => $description);
@ -36,4 +36,4 @@ $twig->display('guilds.list.html.twig', array(
'guilds' => $guilds,
'logged' => isset($logged) ? $logged : false,
'isAdmin' => admin(),
));
));

View File

@ -83,7 +83,7 @@ if(empty($guild_logo) || !file_exists('images/guilds/' . $guild_logo))
$description = $guild->getCustomField('description');
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
if($count < $config['guild_description_lines_limit'])
$description = wordwrap(nl2br($description), 60, "<br />", true);
$description = nl2br($description);
//$description = $description_with_lines;
$guild_owner = $guild->getOwner();
@ -159,4 +159,4 @@ $twig->display('guilds.view.html.twig', array(
'invited_list' => $invited_list,
'show_accept_invite' => $show_accept_invite,
'useGuildNick' => $useGuildNick
));
));

View File

@ -142,7 +142,7 @@
{% set rows = rows + 1 %}
<tr bgcolor="{{ getStyle(rows) }}">
<td valign="top">Comment:</td>
<td>{{ comment|raw }}</td>
<td style="word-break: break-all">{{ comment|raw }}</td>
</tr>
{% endif %}

View File

@ -44,7 +44,7 @@
<img src="images/guilds/{{ guild.logo }}" width="64" height="64">
</td>
<td>
<td style="word-break: break-all">
<span{% if guild.description is not empty %} valign="top"{% endif %}>
<b>{{ guild.name }}</b>{% if isAdmin %}<a href="?subtopic=guilds&action=delete_by_admin&guild={{ guild.name }}"> - Delete this guild (for ADMIN only!)</a>{% endif %}
</span>

View File

@ -47,7 +47,7 @@
<table style="width:100%;">
<tbody>
<tr>
<td>
<td style="word-break: break-all">
<div id="GuildInformationContainer">
{% if description is not empty %}
{{ description|raw }}