Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 867
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

can i see of another way "LAST POSTS" ?

Started by iroNikK, September 19, 2009, 07:45:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iroNikK

I want to know if i can see "LAST POSTS" of a diferent way ?

i don't like this way:



img complete

i would like to see like this:



img complete

Nathaniel

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.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.



Nathaniel

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.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

iroNikK

it looks great!: web

but i would like to delete de "visits" column

Nathaniel

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>';
}
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

iroNikK

#7
thx.

I'm testing some things.

i would like to have it in just one line like this:



TOPIC             -               LAST MESSAGE (ultimo mensaje)             -  ANSWER (respuestas)