<td class="columnText columnSubject">
<h3>
<span class="badge label">{lang}wcf.moderation.type.{@$definitionNames[$entry->objectTypeID]}{/lang}</span>
- <a href="{$entry->getLink()}" class="messageGroupLink">{$entry->getTitle()}</a>
+ <a href="{$entry->getLink()}" class="messageGroupLink">{$entry->getTitle()|tableWordwrap}</a>
</h3>
<small>{if $entry->getAffectedObject()->getUserID()}<a href="{link controller='User' id=$entry->getAffectedObject()->getUserID()}{/link}" class="userLink" data-user-id="{@$entry->userID}">{$entry->getAffectedObject()->getUsername()}</a>{else}{$entry->getAffectedObject()->getUsername()}{/if} - {@$entry->getAffectedObject()->getTime()|time} - {lang}wcf.moderation.type.{@$entry->getObjectTypeName()}{/lang}</small>
</td>
<td class="columnURL columnIpAddress{if $sessionAccessLog->ipAddress != $sessionLog->ipAddress} hot{/if}">{$sessionAccessLog->getIpAddress()}</td>
<td class="columnDate columnTime">{@$sessionAccessLog->time|time}</td>
<td class="columnText columnClassName">{$sessionAccessLog->className}</td>
- <td class="columnURL columnRequestURI" title="{$sessionAccessLog->requestURI}">{if !$sessionAccessLog->hasProtectedURI()}<a href="{$sessionAccessLog->requestURI}{@SID_ARG_2ND}">{$sessionAccessLog->requestURI|truncate:50}</a>{else}{$sessionAccessLog->requestURI|truncate:50}{/if}</td>
+ <td class="columnURL columnRequestURI" title="{$sessionAccessLog->requestURI}">{if !$sessionAccessLog->hasProtectedURI()}<a href="{$sessionAccessLog->requestURI}{@SID_ARG_2ND}">{$sessionAccessLog->requestURI|truncate:50|tableWordwrap}</a>{else}{$sessionAccessLog->requestURI|truncate:50|tableWordwrap}{/if}</td>
<td class="columnText columnRequestMethod">{$sessionAccessLog->requestMethod}</td>
{event name='columns'}
<td class="columnID columnSessionLogID">{@$sessionLog->sessionLogID}</td>
<td class="columnTitle columnUsername"><a href="{link controller='ACPSessionLog' id=$sessionLog->sessionLogID}{/link}">{$sessionLog->username}</a></td>
<td class="columnSmallText columnIpAddress"><a href="{link controller='ACPSessionLog' id=$sessionLog->sessionLogID}{/link}">{$sessionLog->getIpAddress()}</a>{if $sessionLog->hostname != $sessionLog->ipAddress}<br /><a href="{link controller='ACPSessionLog' id=$sessionLog->sessionLogID}{/link}">{$sessionLog->hostname}</a>{/if}</td>
- <td class="columnSmallText columnUserAgent" title="{$sessionLog->userAgent}"><a href="{link controller='ACPSessionLog' id=$sessionLog->sessionLogID}{/link}">{$sessionLog->userAgent|truncate:75}</a></td>
+ <td class="columnSmallText columnUserAgent" title="{$sessionLog->userAgent}"><a href="{link controller='ACPSessionLog' id=$sessionLog->sessionLogID}{/link}">{$sessionLog->userAgent|truncate:75|tableWordwrap}</a></td>
<td class="columnDate columnTime">{@$sessionLog->time|time}</td>
<td class="columnDate columnLastActivityTime">{@$sessionLog->lastActivityTime|time}</td>
<td class="columnDigits columnAccesses">{#$sessionLog->accesses}</td>
</a>
<div>
- <p><a href="{link controller='Attachment' id=$attachment->attachmentID}{/link}">{$attachment->filename}</a></p>
+ <p><a href="{link controller='Attachment' id=$attachment->attachmentID}{/link}">{$attachment->filename|tableWordwrap}</a></p>
<p><small>{if $attachment->userID}<a href="{link controller='UserEdit' id=$attachment->userID}{/link}">{$attachment->username}</a>{else}{lang}wcf.user.guest{/lang}{/if}</small></p>
- {if $attachment->getContainerObject()}<p><small><a href="{$attachment->getContainerObject()->getLink()}">{$attachment->getContainerObject()->getTitle()}</a></small></p>{/if}
+ {if $attachment->getContainerObject()}<p><small><a href="{$attachment->getContainerObject()->getLink()}">{$attachment->getContainerObject()->getTitle()|tableWordwrap}</a></small></p>{/if}
</div>
</div>
</td>
{event name='rowButtons'}
</td>
<td class="columnID">{#$tag->tagID}</td>
- <td class="columnTitle columnName"><a href="{link controller='TagEdit' object=$tag}{/link}" class="badge tag">{$tag->name}</a></td>
+ <td class="columnTitle columnName"><a href="{link controller='TagEdit' object=$tag}{/link}" class="badge tag">{$tag->name|tableWordwrap}</a></td>
<td class="columnDigits columnUsageCount">{if $tag->synonymFor === null}{#$tag->usageCount}{/if}</td>
<td class="columnText columnLanguage">{if $tag->languageName !== null}{$tag->languageName} ({$tag->languageCode}){/if}</td>
<td class="columnText columnSynonymFor">{if $tag->synonymFor !== null}<a href="{link controller='TagList'}search={@$tag->synonymName|rawurlencode}{/link}" class="badge tag">{$tag->synonymName}</a>{/if}</td>
<td class="columnTitle columnUsername">{if $user->editable}<a title="{lang}wcf.acp.user.edit{/lang}" href="{link controller='UserEdit' id=$user->userID}{/link}">{$user->username}</a>{else}{$user->username}{/if}</td>
{foreach from=$columnHeads key=column item=columnLanguageVariable}
- <td class="column{$column|ucfirst}">{if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]}{/if}</td>
+ <td class="column{$column|ucfirst}">{if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]|tableWordwrap}{/if}</td>
{/foreach}
{event name='columns'}
--- /dev/null
+<?php
+namespace wcf\system\template\plugin;
+use wcf\system\template\TemplateEngine;
+use wcf\util\StringUtil;
+
+/**
+ * Template modifier plugin which wordwraps a string.
+ *
+ * Usage:
+ * {$foo|tableWordwrap}
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2013 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.template.plugin
+ * @category Community Framework
+ */
+class TableWordwrapModifierTemplatePlugin implements IModifierTemplatePlugin {
+ /**
+ * @see wcf\system\template\IModifierTemplatePlugin::execute()
+ */
+ public function execute($tagArgs, TemplateEngine $tplObj) {
+ // values
+ $width = 30;
+ $break = "\xE2\x80\x8B";
+ $string = $tagArgs[0];
+
+ $result = '';
+ $substrings = explode(' ', $string);
+
+ foreach ($substrings as $substring) {
+ if (!empty($result)) $result .= ' ';
+
+ $length = StringUtil::length($substring);
+ if ($length > $width) {
+ $j = ceil($length / $width);
+
+ for ($i = 0; $i < $j; $i++) {
+ if ($i) $result .= $break;
+ if ($width * ($i + 1) > $length) $result .= StringUtil::substring($substring, $width * $i);
+ else $result .= StringUtil::substring($substring, $width * $i, $width);
+ }
+ }
+ else {
+ $result .= $substring;
+ }
+ }
+
+ return $result;
+ }
+}
font-family: @wcfBaseFontFamily;
font-size: @wcfBaseFontSize;
line-height: @wcfBaseLineHeight;
- word-break: break-all;
+ word-wrap: break-word;
}
small {