Advertisement:
NameCheap

Author Topic: Mod for displaying thread start date  (Read 892 times)

Offline meetdilip

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Male
  • Translator
Mod for displaying thread start date
« 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







Offline Oldiesmann

  • Lead Developer
  • SMF Super Hero
  • *
  • Posts: 24,113
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Mod for displaying thread start date
« Reply #1 on: November 11, 2011, 12:34:51 AM »
Themes/default/MessageIndex.template.php

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

Offline meetdilip

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Male
  • Translator
Re: Mod for displaying thread start date
« Reply #2 on: November 11, 2011, 12:39:59 AM »
Thanks. Will try and update. :)

Offline Oldiesmann

  • Lead Developer
  • SMF Super Hero
  • *
  • Posts: 24,113
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Mod for displaying thread start date
« Reply #3 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 ;))

Offline meetdilip

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Male
  • Translator
Re: Mod for displaying thread start date
« Reply #4 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 ?

Offline Oldiesmann

  • Lead Developer
  • SMF Super Hero
  • *
  • Posts: 24,113
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Mod for displaying thread start date
« Reply #5 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
Code: [Select]
<td class="subject ', $alternate_class, '">
Replace
Code: [Select]
<td class="subject ', $alternate_class, '" title="', $topic['first_post']['preview'], '">
Or, to just have it show up when they hover over the subject:
Find
Code: [Select]
', $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
Code: [Select]
', $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>' : '';

Offline meetdilip

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Male
  • Translator
Re: Mod for displaying thread start date
« Reply #6 on: November 11, 2011, 01:12:30 AM »
Thanks :)