Add "Show all unread posts" option to header

Started by jlhodge2000, March 21, 2006, 11:57:27 AM

Previous topic - Next topic

jlhodge2000

Currently the header of the forum contains the following links...

QuoteShow unread posts since last visit.
Show new replies to your posts.

If I leave a few unread messages and come back later, I only see the unread posts since my last visit. I have to read all of them or mark them read before it gives me the option...

QuoteNo unread topics found since your last visit. Click here to try all unread topics.

What do I need to do to make the header always contain all three options...

QuoteShow all unread posts.
Show unread posts since last visit.
Show new replies to your posts.

Currently using SMF Default Theme and running SMF 1.0.6

Thanks much.

Kindred

find the line in index.template.php which is:

echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';


change it to


echo '
<a href="', $scripturl, '?action=unread;all">', $txt['show_all_unread'], '</a><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';


and add the follwing line to modifications.english.php
$txt['show_all_unread'] = 'Show all unread posts.';

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


HRM

It's great to have a read ALL new messages button. people who don't visit my foum daily really asked for it.

Thanks a lot Kindred!
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

JustJen

QuoteHey, Jennifer, you have 0 messages, 0 are new. Show all unread posts.
Show unread posts since last visit.
Show new replies to your posts.

September 01, 2006, 08:04:38 AM

Okay, how do I get the  first link onto a new line? Otherwise it works fine. Thanks in advance.

codenaught

Add <br /> right before:

<a href="', $scripturl, '?action=unread;all">', $txt['show_all_unread'], '</a><br />

So it looks like:

<br /><a href="', $scripturl, '?action=unread;all">', $txt['show_all_unread'], '</a><br />
Dev Consultant
Former SMF Doc Coordinator

JustJen


Cameron

I tried this on 1.07 using the default theme and it does not work! Howcome?

There are no errors and no new links, I followed the instructions to the T, why won't it work?

ar3thur

I just updated to the 1.1.1 version and now the "show all unread posts" mod no longer works.  Suggestions?

ar3thur

Never mind!  I put the files in the wrong folder ... duh!  It still works fine now.

lurkalot

A old topic, but it describes exactly what I need to do.

Will this work with SMF2 RC4 / 5 ?  ie: same files to edit same code etc.  If not, can someone point me in the right direction please. 

I know there's a "Click here to try all unread topics." already at the bottom of the latest posts page, but the link doesn't stand out, and people miss it.  So I'd like to add it to the top as described by the OP above. 

Illori

i am not sure the above fix would work for you as it is not written for 2.0. also please start a new topic for each issue, it is easier for support staff to track.

Advertisement: