SimplePortal
Customization => Custom Coding => Topic started by: iroNikK on September 19, 2009, 07:45:49 PM
-
I want to know if i can see "LAST POSTS" of a diferent way ?
i don't like this way:
(http://i35.tinypic.com/wclnr4.jpg)
img complete (http://i35.tinypic.com/wclnr4.jpg)
i would like to see like this:
(http://i34.tinypic.com/8wzecx.jpg)
img complete (http://i34.tinypic.com/8wzecx.jpg)
-
Moved to the Themes and Graphics board.
This shouldn't be too hard, I'll have a look at it when I get some time. For now, I can tell you that you want to edit the 'sp_recent' function from the 'sources/PortalBlocks.php' file.
-
Okey, thank you!
-
and? :P
i moved to RC 2
-
elseif ($display == 'full')
{
echo '
<table class="sp_fullwidth">';
foreach ($items as $item)
echo '
<tr>
<td class="sp_recent_icon sp_center">
', sp_embed_image(empty($parameters['type']) ? 'post' : 'topic'), '
</td>
<td class="sp_recent_subject">
<a href="', $item['href'], '">', $item['subject'], '</a>
', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '<br />[', $item['board']['link'], ']
</td>
<td class="sp_recent_info sp_right">
', $item['poster']['link'], '<br />', $item['time'], '
</td>
</tr>';
echo '
</table>';
}
elseif ($display == 'full')
{
echo '
<table class="sp_fullwidth">
<tr>
<th></th>
<th style="text-align: left;">
', $txt['subject'], '
</th>
<th style="text-align: left;">
', $txt['last_post'], '
</th>
<th style="text-align: left;">
', $txt['views'], '
</th>
<th style="text-align: left;">
', $txt['replies'], '
</th>
</tr>';
foreach ($items as $item)
echo '
<tr>
<td class="sp_recent_icon sp_center">
', sp_embed_image(empty($parameters['type']) ? 'post' : 'topic'), '
</td>
<td class="sp_recent_subject">
<div style="float: left;">', $item['icon'], '</div>
<div style="padding-left: 30px;">
<a href="', $item['href'], '">', $item['subject'], '</a>
', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '<br />[', $item['board']['link'], ']
</div>
</td>
<td class="">
', $item['poster']['link'], '<br />', $item['time'], '
</td>
<td class="">
', $item['views'], '
</td>
<td class="">
', $item['replies'], '
</td>
</tr>';
echo '
</table>';
}
Note: For the far left images, you will need to change your 'Themes/{themename}/images/sp/topic.gif' file to whatever image you want.
-
it looks great!: web (http://www.nizagames.com.ar)
but i would like to delete de "visits" column
-
Use the replace code below instead.
elseif ($display == 'full')
{
echo '
<table class="sp_fullwidth">
<tr>
<th></th>
<th style="text-align: left;">
', $txt['subject'], '
</th>
<th style="text-align: left;">
', $txt['last_post'], '
</th>
<th style="text-align: left;">
', $txt['replies'], '
</th>
</tr>';
foreach ($items as $item)
echo '
<tr>
<td class="sp_recent_icon sp_center">
', sp_embed_image(empty($parameters['type']) ? 'post' : 'topic'), '
</td>
<td class="sp_recent_subject">
<div style="float: left;">', $item['icon'], '</div>
<div style="padding-left: 30px;">
<a href="', $item['href'], '">', $item['subject'], '</a>
', $item['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $item['topic'] . '.msg' . $item['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '<br />[', $item['board']['link'], ']
</div>
</td>
<td class="">
', $item['poster']['link'], '<br />', $item['time'], '
</td>
<td class="">
', $item['replies'], '
</td>
</tr>';
echo '
</table>';
}
-
thx.
I'm testing some things.
i would like to have it in just one line like this:
(http://i47.tinypic.com/2z6z0r7.jpg)
TOPIC - LAST MESSAGE (ultimo mensaje) - ANSWER (respuestas)