Advertisement:

Author Topic: New posts  (Read 4307 times)

Offline halpern

  • Semi-Newbie
  • *
  • Posts: 28
New posts
« on: April 21, 2006, 08:51:28 PM »
When individuals make new posts, is there a way to have it so the post is in bold versus having the New icon next to the thread?  Just curious.  I know most other boards just have a bold setting for when there is a new post.  TIA..

Offline Jos

  • Newbie
  • *
  • Posts: 8
Re: New posts
« Reply #1 on: July 27, 2006, 10:28:17 PM »
Did you figure this out?  I would like to know also.

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: New posts
« Reply #2 on: July 27, 2006, 11:55:01 PM »
You can remove the new icon by finding this (or similar) and removing or commenting it out in Themes/Theme_Name/MessageIndex.template.php

Code: [Select]
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';

And to make new topics appear bold, edit the same file and change:

Code: [Select]
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';

to:

Code: [Select]
echo '
', $topic['is_sticky'] || ($topic['new'] && $context['user']['is_logged']) ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] || ($topic['new'] && $context['user']['is_logged']) ? '</b>' : '';

Note, this is for the SMF 1.1 RC2 Core theme.

Edit: A few minutes after time posted - Fixed bug where it would show all topic links as bold for guests.
« Last Edit: July 27, 2006, 11:57:40 PM by akabugeyes »
Dev Consultant
Former SMF Doc Coordinator

Offline karlpox

  • Semi-Newbie
  • *
  • Posts: 13
Re: New posts
« Reply #3 on: May 18, 2007, 10:03:46 AM »
cant seem to find MessangeIndex.template.php in the theme folder but I can find the Index.template.php & the code is not there either.

Offline N3lson

  • Sr. Member
  • ****
  • Posts: 808
  • Gender: Male
Re: New posts
« Reply #4 on: May 18, 2007, 02:15:33 PM »
cant seem to find MessangeIndex.template.php in the theme folder but I can find the Index.template.php & the code is not there either.

Go to the default...
The theme you are using certainly uses some of  the default files..
I´m Portuguese Yeah

Offline codenaught

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,653
  • Gender: Male
  • Formerly Known As akabugeyes
Re: New posts
« Reply #5 on: June 24, 2007, 05:19:46 PM »
karlpox, halpern, Jos, do any of you still need assistance with this? I am going to marked this as solved as I have posted a solution on how to do this and as N3lson pointed out if the file is not in your custom theme, you would want to edit it in the default theme directory.

Let me know if any of you need further assistance with this. :)
Dev Consultant
Former SMF Doc Coordinator