Subject with Time

Started by pixeleyes, June 17, 2012, 10:14:18 AM

Previous topic - Next topic

pixeleyes

I want to add post subject before page index

Subject is working fine but time is not showing.

Quoteecho '
   <div class="topsub">
   ', $txt['topic'],  ':
   ', $context['subject'], '
   <p ', $topic['first_post']['member']['link'], ' ', $topic['first_post']['time'], '</p>
   </div>';

Can anyone correct it?

All Colours Sam

Where exactly are you putting this code on? which page and on which part.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pixeleyes

I'm putting these codes on top of post page.

Right after red marked subject I want Poster name with time.

All Colours Sam

Don't you mean Display.template?

On display.template.php $topic holds nothing mire than the topic ID,  is an int and not an array, meaning $topic['first_post']['member']['link'] will not exist.

If you want info about the first message then you will need to do a query like this mod does: http://custom.simplemachines.org/mods/index.php?mod=1472
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Advertisement: