News:

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

Main Menu

Bold topics with new posts?

Started by tennis4you, September 15, 2007, 10:46:04 PM

Previous topic - Next topic

tennis4you

I see that when I use a Sticky" it bolds the text.  I would love to be able to bold thread titles that have posts that I have not yet read?  When I used phpBB2 it would just use a different color for the thread title which made life really easy when searching to see what I had missed.  Any options here?

codenaught

This seems more or less almost the same question you had here:

http://www.simplemachines.org/community/index.php?topic=195044.msg1241909#msg1241909

If you want to bold it:

Open Themes/<theme_name>/Display.template.php:

echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '" ><a ' . ($topic['new'] ? 'class="newtopic"' : '') . ' href="', $topic['first_post']['href'], '">' . $topic['first_post']['subject'] . '</a></span>', $topic['is_sticky'] ? '</b>' : '';


Change the above to:

echo '
', $topic['is_sticky'] || $topic['new'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '" ><a ' . ($topic['new'] ? 'class="newtopic"' : '') . ' href="', $topic['first_post']['href'], '">' . $topic['first_post']['subject'] . '</a></span>', $topic['is_sticky'] || $topic['new'] ? '</b>' : '';


How do I modify files?
Dev Consultant
Former SMF Doc Coordinator

tennis4you

Quote from: akabugeyes on September 15, 2007, 10:50:38 PM
This seems more or less almost the same question you had here:

http://www.simplemachines.org/community/index.php?topic=195044.msg1241909#msg1241909

If you want to bold it:

Open Themes/<theme_name>/Display.template.php:

echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '" ><a ' . ($topic['new'] ? 'class="newtopic"' : '') . ' href="', $topic['first_post']['href'], '">' . $topic['first_post']['subject'] . '</a></span>', $topic['is_sticky'] ? '</b>' : '';


Change the above to:

echo '
', $topic['is_sticky'] || $topic['new'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '" ><a ' . ($topic['new'] ? 'class="newtopic"' : '') . ' href="', $topic['first_post']['href'], '">' . $topic['first_post']['subject'] . '</a></span>', $topic['is_sticky'] || $topic['new'] ? '</b>' : '';


How do I modify files?

I don't see any code like that in the Display.template.php file.  I searched it manually and did a "search" and found nothing that matches.  Help?

!Hachi!

Happy Ramadan


codenaught

If you are having trouble finding that much code, then:

Just search for each occurrence of:

$topic['is_sticky'] ?

And replace the ones that have '<b>' or '</b>' right after it, with this:

$topic['is_sticky'] || $topic['new'] ?
Dev Consultant
Former SMF Doc Coordinator

tennis4you

Quote from: akabugeyes on September 16, 2007, 12:45:51 AM
If you are having trouble finding that much code, then:

Just search for each occurrence of:

$topic['is_sticky'] ?

And replace the ones that have '<b>' or '</b>' right after it, with this:

$topic['is_sticky'] || $topic['new'] ?

That code cannot be found either.  Weird...

codenaught

Sorry, it is in MessageIndex.template.php, not Display.template.php.
Dev Consultant
Former SMF Doc Coordinator

tennis4you


Advertisement: