SimplePortal

Customization => Custom Coding => Topic started by: TopPP on March 17, 2013, 03:58:20 AM

Title: Recent Posts : How to make all info are in same line ฦ
Post by: TopPP on March 17, 2013, 03:58:20 AM
Hello ,
  Now a Recent Posts is like this :

..........TOPIC.............. by SOMEONE
[ DATE at TIME ]


how to make it like this : (all in same line)

..........TOPIC.............. by SOMEONE                                                                         [ DATE at TIME ]


Thank you !
Title: Re: Recent Posts : How to make all info are in same line ฦ
Post by: AngelinaBelle on June 13, 2013, 06:20:21 AM
This will require some modification in PortalBlocks.php, in the sp_recent function.
Title: Re: Recent Posts : How to make all info are in same line ฦ
Post by: ccbtimewiz on June 13, 2013, 08:38:06 PM
Might not be the most appropriate fix but this could do what you want...

Open ./Sources/PortalBlocks.php

Find:
Code: [Select]
', $item['poster']['link'], '<br />', $item['time'], '
Replace with:
Code: [Select]
', $item['poster']['link'], '<div align="right">', $item['time'], '</div>
There are other, better ways to do it by just manipulating how the table is displayed. If you have basic knowledge of HTML tables, the information is actually made in a table:

Code: [Select]
<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>';
SimplePortal 2.3.8 © 2008-2024, SimplePortal