mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Guilds & Characters: Use CSS word-break: break-all instead of PHP wordwrap
Suggested by @anyeor
This commit is contained in:
parent
8cf4d0cb0f
commit
5eafff737a
@ -396,7 +396,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
'rank' => isset($guild_name) ? $rank_of_player->getName() : null,
|
'rank' => isset($guild_name) ? $rank_of_player->getName() : null,
|
||||||
'link' => isset($guild_name) ? getGuildLink($guild_name) : 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,
|
'skills' => isset($skills) ? $skills : null,
|
||||||
'quests_enabled' => $quests_enabled,
|
'quests_enabled' => $quests_enabled,
|
||||||
'quests' => isset($quests) ? $quests : null,
|
'quests' => isset($quests) ? $quests : null,
|
||||||
|
@ -27,7 +27,7 @@ if(count($guilds_list) > 0)
|
|||||||
$description = $guild->getCustomField('description');
|
$description = $guild->getCustomField('description');
|
||||||
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
||||||
if ($count < $config['guild_description_lines_limit'])
|
if ($count < $config['guild_description_lines_limit'])
|
||||||
$description = wordwrap(nl2br($description), 60, "<br />", true);
|
$description = nl2br($description);
|
||||||
|
|
||||||
$guildName = $guild->getName();
|
$guildName = $guild->getName();
|
||||||
$guilds[] = array('name' => $guildName, 'logo' => $guild_logo, 'link' => getGuildLink($guildName, false), 'description' => $description);
|
$guilds[] = array('name' => $guildName, 'logo' => $guild_logo, 'link' => getGuildLink($guildName, false), 'description' => $description);
|
||||||
|
@ -86,7 +86,7 @@ if(empty($guild_logo) || !file_exists(GUILD_IMAGES_DIR . $guild_logo))
|
|||||||
$description = $guild->getCustomField('description');
|
$description = $guild->getCustomField('description');
|
||||||
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
|
||||||
if($count < $config['guild_description_lines_limit'])
|
if($count < $config['guild_description_lines_limit'])
|
||||||
$description = wordwrap(nl2br($description), 60, "<br />", true);
|
$description = nl2br($description);
|
||||||
//$description = $description_with_lines;
|
//$description = $description_with_lines;
|
||||||
|
|
||||||
$guild_owner = $guild->getOwner();
|
$guild_owner = $guild->getOwner();
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
{% set rows = rows + 1 %}
|
{% set rows = rows + 1 %}
|
||||||
<tr bgcolor="{{ getStyle(rows) }}">
|
<tr bgcolor="{{ getStyle(rows) }}">
|
||||||
<td valign="top">Comment:</td>
|
<td valign="top">Comment:</td>
|
||||||
<td>{{ comment|raw }}</td>
|
<td style="word-break: break-all">{{ comment|raw }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild.logo }}" width="64" height="64">
|
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild.logo }}" width="64" height="64">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td style="word-break: break-all">
|
||||||
<span{% if guild.description is not empty %} valign="top"{% endif %}>
|
<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 %}
|
<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>
|
</span>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<table style="width:100%;">
|
<table style="width:100%;">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td style="word-break: break-all">
|
||||||
<div id="GuildInformationContainer">
|
<div id="GuildInformationContainer">
|
||||||
{% if descriptions is not empty %}
|
{% if descriptions is not empty %}
|
||||||
{{ description }}
|
{{ description }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user