TinyPortal
General => Chit chat => Topic started by: tarik004 on December 19, 2006, 02:43:54 PM
First post in sticky topics shows on each page. Also adds separator after sticky topics
Don't forget to back up !
Open MessageIndex.template.php
look for :
// No topics.... just say, "sorry bub".
else
echo '
<td class="catbg3" width="100%" colspan="7"><b>', $txt[151], '</b></td>';
echo '
</tr>';
if (!empty($settings['display_who_viewing']))
{
echo '
<tr class="windowbg2">
<td colspan="' , !empty($options['display_quick_mod']) ? '8' : '7' , '"><small>';
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19];
else
echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) or $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_board'], '
</small></td>
</tr>';
}
foreach ($context['topics'] as $topic)
{
replace :
}
foreach ($context['topics'] as $topic)
{
with :
}
//For the stick or nonstick listings...
$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if($topic['is_sticky'] && !$stickybar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Pinned Topics</b></td></tr>';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr class="titlebg"><td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"><b>Normal Topics</b></td></tr>';
$normalbar = true;
}
Cool , merci pour ce petit bout de code bien utile
Quote from: krust on December 19, 2006, 03:19:45 PM
Cool , merci pour ce petit bout de code bien utile
de rien mon ami