Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: JayBachatero - helmikuu 18, 2005, 12:12:05 AP

Otsikko: new post image
Kirjoitti: JayBachatero - helmikuu 18, 2005, 12:12:05 AP
OK i have this code to show the latest topic using SSI a certain way.  i want it to show the "new" image on a topic if its new.  how can i do this

<?php
$array ssi_recentPosts(8, array(), 'array');
foreach ($array as $topic)
echo $topic['link'],' by ',$topic['poster']['link'], '<br />';
?>
Otsikko: Re: new post image
Kirjoitti: [Unknown] - helmikuu 20, 2005, 01:21:37 AP
Well, $topic['new'] is what you likely want.

-[Unknown]
Otsikko: Re: new post image
Kirjoitti: JayBachatero - helmikuu 20, 2005, 09:22:46 IP
na [Unknown} it didnt work.  this is that i have

<?php
$array ssi_recentPosts(8, array(), 'array');
foreach ($array as $topic)
echo $topic['link'],$topic['new'],' by ',$topic['poster']['link'], '<br />';
?>


this is the image imtalking about (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fkevmundial.com%2Fboard%2FThemes%2FSpaceman2%2Fimages%2Fenglish%2Fnew.gif&hash=b7baae5282ccdf6d35794188616ea6c4ba4fe438)
sumthing like "new post (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fkevmundial.com%2Fboard%2FThemes%2FSpaceman2%2Fimages%2Fenglish%2Fnew.gif&hash=b7baae5282ccdf6d35794188616ea6c4ba4fe438)"
Otsikko: Re: new post image
Kirjoitti: [Unknown] - helmikuu 20, 2005, 11:54:27 IP
You have to show that image manually, just like it does it in the MessageIndex template:

<a href="', $scripturl, '?topic=', $topic['id'], '.from', $topic['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>

-[Unknown]
Otsikko: Re: new post image
Kirjoitti: JayBachatero - helmikuu 24, 2005, 08:40:45 IP
how do i put it in the code this is what i did and it didnt work
<?php
$array ssi_recentPosts(8, array(), 'array');
foreach ($array as $topic)
echo $topic['link'],' by ',$topic['poster']['link'],$topic['new']<a href="', $scripturl, '?topic=', $topic['id'], '.from', $topic['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>, '<br />';
?>
Otsikko: Re: new post image
Kirjoitti: [Unknown] - helmikuu 25, 2005, 01:32:48 AP
<?php
$array ssi_recentPosts(8, array(), 'array');
foreach ($array as $topic)
echo $topic['link'],' by ',$topic['poster']['link'], '<a href="'$scripturl'?topic='$topic['id'], '.from'$topic['newtime'], '#new"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt[302], '" border="0" /></a><br />';
?>


-[Unknown]