SimplePortal

Customization => Custom Coding => Topic started by: iroNikK on September 19, 2009, 07:45:49 PM

Title: can i see of another way "LAST POSTS" ?
Post 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)
Title: Re: can i see of another way "LAST POSTS" ?
Post by: Nathaniel on September 20, 2009, 01:40:07 AM
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.
Title: Re: can i see of another way "LAST POSTS" ?
Post by: iroNikK on September 20, 2009, 04:08:56 PM
Okey, thank you!
Title: Re: can i see of another way "LAST POSTS" ?
Post by: iroNikK on November 10, 2009, 09:58:05 PM
and? :P
i moved to RC 2
Title: Re: can i see of another way "LAST POSTS" ?
Post by: Nathaniel on December 10, 2009, 08:30:26 PM
Code: ("Find (Sources/PortalBlocks.php)") [Select]
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>';
}

Code: ("Replace") [Select]
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.
Title: Re: can i see of another way "LAST POSTS" ?
Post by: iroNikK on December 22, 2009, 06:00:58 PM
it looks great!: web (http://www.nizagames.com.ar)

but i would like to delete de "visits" column
Title: Re: can i see of another way "LAST POSTS" ?
Post by: Nathaniel on December 25, 2009, 06:44:29 AM
Use the replace code below instead.

Code: [Select]
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>';
}
Title: Re: can i see of another way "LAST POSTS" ?
Post by: iroNikK on February 23, 2010, 12:22:11 AM
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)
SimplePortal 2.3.8 © 2008-2024, SimplePortal