New posts button...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

New posts button...

Post by getalinks » Thu Jun 05, 2008 2:08 am

Is there a Mod or something that allows a member to click on a button and view all the new posts since last time he visited?
Last edited by ric323 on Thu Jun 26, 2008 11:04 pm, edited 2 times in total.
Reason: Topic icon changed

User avatar
Jim_UK
Former Team Member
Posts: 18478
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: New posts button...

Post by Jim_UK » Thu Jun 05, 2008 6:25 pm

When the user logs in there is a link usually near the top right and just below the header that says "View posts since last visit"

If you wanted a button then you could create one to replace the text.

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!

getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

Re: New posts button...

Post by getalinks » Tue Jun 10, 2008 6:16 pm

How do I create that button? What is the code for it? It doesn't appear on my forums. The only ones I see are "View unread posts", "View your posts" and "View unanswered posts".

User avatar
Jim_UK
Former Team Member
Posts: 18478
Joined: Tue Oct 12, 2004 5:36 pm
Location: Darwen N.West UK

Re: New posts button...

Post by Jim_UK » Tue Jun 10, 2008 7:31 pm

This is the top of my templates/mystyle/index_body.tpl and the bit that generates the item in question I have coloured red.
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td><span class="gen">
{L_NAME_WELCOME} {U_WELCOME_NAME}<br />
</td>
</tr>
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>

Jim
The truth is out there.
Unfortunately they will not let you anywhere near it!

getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

Re: New posts button...

Post by getalinks » Wed Jun 11, 2008 3:11 am

Ah, I have that one. What I'm looking for is one that shows news posts since last time the member was on the site, not posts they haven't read ever. Any ideas about that?

momentum
Registered User
Posts: 1505
Joined: Thu Sep 20, 2007 4:07 am
Location: Melbourne, Australia

Re: New posts button...

Post by momentum » Wed Jun 11, 2008 5:10 am

getalinks wrote:Ah, I have that one. What I'm looking for is one that shows news posts since last time the member was on the site, not posts they haven't read ever. Any ideas about that?
That is exactly what Jim has posted.

Craig.
QOTY: phpBB is free, good hosting is not. - robert (Lumpy Burgertushie)

some blind fool
Registered User
Posts: 409
Joined: Sat Aug 19, 2006 5:28 pm

Re: New posts button...

Post by some blind fool » Wed Jun 11, 2008 5:39 pm

getalinks, will you please open yourphpbbroot/language/lang_english/lang_main.php. find and post the line that starts with this code?

Code: Select all

$lang['Search_new'] =

getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

Re: New posts button...

Post by getalinks » Thu Jun 26, 2008 2:15 am

Sorry, been out of touch. Here's that line of code you were after:

Code: Select all

$lang['Search_new'] = 'View unread posts';

User avatar
Lumpy Burgertushie
Registered User
Posts: 66561
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: New posts button...

Post by Lumpy Burgertushie » Thu Jun 26, 2008 5:03 am

getalinks wrote:Sorry, been out of touch. Here's that line of code you were after:

Code: Select all

$lang['Search_new'] = 'View unread posts';
I have no idea why that person asked you for that. It has no bearing on what you want.

The board assumes that if you logged in, then you read all the unread messages, whether you did or not.

Therefore, if you click on that "new posts" link, you will get the posts that are new since your last visit.

There is a MOD around here somewhere called the "keep unread flag" or something like that.

It will change this behaviour so that messages you have not read will stay "unread" until you read them, even if you log out before you do.

If that is not what you want then you will have to ask for a custom MOD to do whatever it is you want.

You do that in the MOD Request forum.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

Re: New posts button...

Post by getalinks » Thu Jun 26, 2008 5:20 am

That Keep Unread posts thing seems to be what my board is doing right now. I don't have that Mod installed and even if you log out and log in, whatever posts you haven't read will remain unread until you either read them or hit the mark all posts viewed button.

What I would like, which would be much easier, is to be able to add the "Mark All Forums Read" link also at the top of the frums near these other links: You have no unread posts, View your posts, View unanswered posts. I believe this would be what the members are after but many don't see that link as it's almost hidden at the bottom of the forums, just above the Who's Online box.

So, I suppose my question is now, where would I find the code of the "Mark All Forums Read" link to copy and where would I paste to display it below the other three links at the top of my forums?

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: New posts button...

Post by ric323 » Thu Jun 26, 2008 5:36 am

There is already a "Mark all forums read" link, immediately above the "who is online" box.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
Lumpy Burgertushie
Registered User
Posts: 66561
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: New posts button...

Post by Lumpy Burgertushie » Thu Jun 26, 2008 6:00 am

open index_body.tpl in a text editor;

find this:

Code: Select all

<!-- BEGIN switch_user_logged_in -->
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<!-- END switch_user_logged_in -->
replace with this:

Code: Select all

<!-- BEGIN switch_user_logged_in -->
		<a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a><br />
		<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
		<!-- END switch_user_logged_in -->
that will copy the link from the bottom to the top

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

getalinks
Registered User
Posts: 222
Joined: Wed May 17, 2006 5:16 am
Location: Wisconsin, USA
Contact:

Re: New posts button...

Post by getalinks » Thu Jun 26, 2008 10:56 pm

Thank you sooo much.

Locked

Return to “2.0.x Support Forum”