Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: meetdilip on November 11, 2011, 12:12:40 AM

Title: Mod for displaying thread start date
Post by: meetdilip on November 11, 2011, 12:12:40 AM
hi, do we have any mod for displaying thread start date in the board itself ? Please check the screen shot below


(https://www.simplemachines.org/community/index.php?action=dlattach;topic=458837.0;attach=190390;image)



Title: Re: Mod for displaying thread start date
Post by: Oldiesmann on November 11, 2011, 12:34:51 AM
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'], '
Title: Re: Mod for displaying thread start date
Post by: meetdilip on November 11, 2011, 12:39:59 AM
Thanks. Will try and update. :)
Title: Re: Mod for displaying thread start date
Post by: Oldiesmann on November 11, 2011, 12:43:05 AM
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 ;))
Title: Re: Mod for displaying thread start date
Post by: meetdilip on November 11, 2011, 12:46:43 AM
Thanks a lot. Please show me how to do it.

Will this feature go heavy on bandwidth ?
Title: Re: Mod for displaying thread start date
Post by: Oldiesmann on November 11, 2011, 01:08:51 AM
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>' : '';
Title: Re: Mod for displaying thread start date
Post by: meetdilip on November 11, 2011, 01:12:30 AM
Thanks :)