Autor Tópico: MessagePreview Inline  (Lida 6293 vezes)

0 Membros e 4 Visitantes estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5073
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
MessagePreview Inline
« em: 20 de Janeiro de 2008, 02:33 »
$themedir/MessageIndex.template.php

Código: [Seleccione]
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';

Alterar colocar
Código: [Seleccione]
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
$preLength = $modSettings['previewLength'];
$oldPreview = $topic['first_post']['preview'];
$newPreview = wordwrap($oldPreview, $preLength, "\n", 1);
echo'<span class="smalltext"><br />', $newPreview , '</span><br />';

$themedir/Admin.template.php

Código: [Seleccione]
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="edit_disable_time_input">', $txt['edit_disable_time'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=edit_disable_time" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['edit_disable_time_zero'], '</div>
</th>
<td valign="top">
<input type="text" name="edit_disable_time" id="edit_disable_time_input" value="', empty($modSettings['edit_disable_time']) ? '0' : $modSettings['edit_disable_time'], '" size="5" /> ', $txt['manageposts_minutes'], '
</td>
</tr>

Alterar por

Código: [Seleccione]
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="previewLength_input">', $txt['previewLength_desc'], '</label> <span style="font-weight: normal;">:
<div class="smalltext" style="font-weight: normal;">', $txt['edit_disable_time_zero'], '</div>
</th>
<td valign="top">
<input type="text" name="previewLength" id="previewLength_input" value="', empty($modSettings['previewLength']) ? '0' : $modSettings['previewLength'], '" size="5" /> ', $txt['previewCharacters'], '
</td>
</tr>

$sourcedir/ManagePosts.php

Código: [Seleccione]
'edit_disable_time' => empty($_POST['edit_disable_time']) ? '0' : (int) $_POST['edit_disable_time'],
Código: [Seleccione]
'previewLength' => empty($_POST['previewLength']) ? '0' : (int) $_POST['previewLength'],
$themedir/languages/ModSettings.english.php

Código: [Seleccione]
$txt['previewLength'] = 'Length of the message preview';

$themedir/languages/Admin.english.php
Código: [Seleccione]
$txt['previewLength_desc'] = 'Length of the message preview';
$txt['previewCharacters'] = 'characters';