Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: mark7144 - maaliskuu 11, 2006, 12:39:43 AP

Otsikko: Recent Posts SSI
Kirjoitti: mark7144 - maaliskuu 11, 2006, 12:39:43 AP
Hi, please can someone look at the recent posts code I'm using as I have a few questions:

<?php

$array 
ssi_recentPosts(8, array(13), 'array');

foreach (
$array as $recent)
{
  
$subject html_entity_decode($recent['subject']);
  if (
strlen($subject) > 25)
    
$subject htmlentities(substr($subject022)) . '';
  else
    
$subject $recent['subject'];
echo 
'
- <a href="'
$recent['href'], '" >
'
$subject'
'
$recent['new'] ? '' '<a href="' $scripturl '?topic=' $recent['topic'] . '.from' $recent['newtime'] . ';topicseen#new"><img src="http://www.murraysworld.com/img/new-recent.gif" border="0" /></a>''
</a><br/>'
;
}
?>


1. How can I make it so it doesn't show several latest posts from the SAME topic, I just want the latest post grabbed not several.

2. How do I restrict the boards it grabs the latest posts from?

3. Can you make it so the number of replies for the specific topics are shown in brackets?

3. Is there anyway to stop it showing the 'Re:' before the posts.

Thanks a lot, I hope someone can help me with this!
Otsikko: Re: Recent Posts SSI
Kirjoitti: bryan_49ers - maaliskuu 20, 2006, 11:40:54 IP
I'm still battling with this too :)