News:

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

Main Menu

Mod for displaying thread start date

Started by meetdilip, November 11, 2011, 12:12:40 AM

Previous topic - Next topic

meetdilip

hi, do we have any mod for displaying thread start date in the board itself ? Please check the screen shot below







Oldiesmann

Themes/default/MessageIndex.template.php

Find
<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '

Replace
<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], ', ', $topic['first_post']['time'], '

meetdilip


Oldiesmann

You're welcome :)

The great thing about SMF is that all the data is already there, even if it's not used in the templates. I can also show you how to do the "topic preview on mouseover" thing if you want (that's already there as well ;))

meetdilip

Thanks a lot. Please show me how to do it.

Will this feature go heavy on bandwidth ?

Oldiesmann

No, it shouldn't affect your bandwidth that much.

Themes/default/MessageIndex.template.php

If you want it to show up as soon as the mouseover that entire table cell:

Find
<td class="subject ', $alternate_class, '">

Replace
<td class="subject ', $alternate_class, '" title="', $topic['first_post']['preview'], '">

Or, to just have it show up when they hover over the subject:
Find
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';

Replace
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '" title="' . $topic['first_post']['preview'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';


Advertisement: