Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

new post image

Aloittaja JayBachatero, helmikuu 18, 2005, 12:12:05 AP

« edellinen - seuraava »

JayBachatero

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 />';
?>
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

[Unknown]

Well, $topic['new'] is what you likely want.

-[Unknown]

JayBachatero

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
sumthing like "new post "
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

[Unknown]

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]

JayBachatero

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 />';
?>
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

[Unknown]

<?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]

Advertisement: