News:

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

Main Menu

Relocating the NEW marker

Started by Craw, April 07, 2008, 05:31:46 PM

Previous topic - Next topic

Craw

Hi all,

I want to relocate the NEW image marker when there are new unread posts since your last visit:

I want to put it BEFORE the topic title and NOT AFTER.

Please help. How do I do this? Thanks :)
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Eliana Tamerin

Open your default MessageIndex.template.php (you'll have to edit this on any theme that has it's own MessageIndex.template.php as well).

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

// 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>';


Replace with:
// 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>';

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


Tested and working.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Craw

Thanks Eliana. I'll try it tomorrow. I gotta go sleep now and just checked :D
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Craw

OK, I was able to test it. And it works like how I wanted it to.

Thanks a bunch, Eliana! :)
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Eliana Tamerin

Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

rumfa

I was just seraching for it. Thanks. It looks much orderly now.

Advertisement: