View or mark unread posts

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.

View or mark unread posts

Postby MOD Robot » Sun Feb 24, 2008 5:15 pm

Modification name: View or mark unread posts
Author: asinshesq
Modification description: Adds a 'View unread posts' or 'You have no unread posts' link on the index page (and, for subsilver2, each other page). Also adds a 'Mark post as unread' link at the bottom of each post.
Modification version: 1.0.9
Tested on phpBB version: 3.0.10

Download file: view_or_mark_unreads_1-0-9.zip
File size: 128271 Bytes

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Modifications Team may not be able to provide support.

-->Modification support<--
Last edited by MOD Robot on Thu Feb 23, 2012 8:46 am, edited 13 times in total.
(this is a non-active account manager for the phpBB MOD Team)
MOD Robot
MOD Queue Bot
MOD Queue Bot
 
Posts: 24703
Joined: Sat Aug 16, 2003 7:36 am

View or mark unread posts

Postby Paul » Sun Feb 24, 2008 5:15 pm

Modification validated/released

Notes:
Knock knock
Race condition
Who's there?
User avatar
Paul
MOD Team Member
MOD Team Member
 
Posts: 17565
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier

View or mark unread posts

Postby asinshesq » Sun Feb 24, 2008 5:15 pm

Thanks for completing the validation, guys. Hope this mod proves useful for people. The description of the final approved mod is a bit broader than the one listed above (the version I initially submitted was an earlier version and I made some enhancements along the way). Here's the current description:

Adds a 'View unread posts' or 'You have no unread posts' link on the index page (and, for subsilver2, each other page). Also adds a 'Mark post as unread' link at the bottom of each post and a mark pm as unread link at the bottom of each private message as well as a folder in the private messages part of the UCP for unread pms.


[edit: effective as of phpbb3.0.6, phpbb now includes a view unread posts link so this mod no longer adds that, but it stll toggles the text from view unread posts ot you have no unread posts depending on whether there are any unread posts and it still performs the other functions of the original mod]

By the way, some people may wonder whether there is a way to show the number of unread posts right next to the unread post link. Here is my stock answer for that question:

The code this mod uses to figure out if there are unread posts is from phpbb3's core code in functions_display(). It is quite efficient and should not weigh down a board. If you change the code to count topics that have unread posts in them, that will begin to weigh down large boards (and may confuse people because the number of topics with unread posts is different from the number of unread posts). And if you change the code to count unread posts (rather than just topics that have unread posts), I suspect that will substantially weigh down boards (perhaps enough to be noticeable on boards that aren't that big). I don't think the overhead is worth it, and as a result I don't plan to add that feature.

However, anyone who wants to write the code is free to do that and post it here for people to try (I don't think it would be that hard if you know your way around php and mysql).

[added by edit: if you want to add this functionality despite the drag on your board (e.g. if you have a small board and aren't too worried about some extra queries), see viewtopic.php?p=8265455#p8265455 ]


In prosilver this mod adds the link "View your unread posts" only to the index page. If you want the link to appear on other prosivler pages, see viewtopic.php?p=8267965#p8267965
Last edited by asinshesq on Sun Jan 10, 2010 12:40 pm, edited 17 times in total.
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Postby Paph » Sun Feb 24, 2008 5:59 pm

Great News! :D
Now I can download the validated version and add it to my forum.
Hawk
Paph
Registered User
 
Posts: 287
Joined: Tue Dec 25, 2007 7:58 am
Location: Georgia - USA

Re: View or mark unread posts

Postby moifest » Sun Feb 24, 2008 6:02 pm

Nice work.

One of the most useful mods I installed on my board!
moifest
Registered User
 
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm
Location: Scotland

Re: View or mark unread posts

Postby sovietpop » Sun Feb 24, 2008 7:30 pm

Has anyone installed this mod on a board that uses the Ubuntu* template? I can't work out what changes I need to make to the template files as my html is pretty damn weak.


this template is based on subsilver2 I think.
sovietpop
Registered User
 
Posts: 14
Joined: Fri Nov 16, 2007 5:15 pm

Re: View or mark unread posts

Postby asinshesq » Sun Feb 24, 2008 8:19 pm

sovietpop wrote:Has anyone installed this mod on a board that uses the Ubuntu* template? I can't work out what changes I need to make to the template files as my html is pretty damn weak.

I would suggest that if you are going to be installing mods and you don't have a feel for html, you are way better off sticking with prosilver or subsilver2 since most mod authors are not going to go through the hassle of figuring out changes for templates other than the standard ones.

But having said that, I just spent some time taking a look at ubuntu template so you can give this a try:

Code: Select all
##############################################################
## MOD Title:      View or mark unread posts - ubuntu changes
## MOD Author: asinshesq < N/A > (Alan) N/A
## MOD Description:   Ubuntu changes for the view or mark unread posts mod
##
## MOD Version:      1.0.4
##
## Installation Level:   Easy
## Installation Time:   5 Minutes
##
## Files To Edit:   styles/ubuntu/template/overall_header.html
##               styles/ubuntu/template/search_results.html
##               styles/ubuntu/template/ucp_pm_viewmessage.html
##               styles/ubuntu/template/viewtopic_body.html
##
## License:         http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:   N/A
##
##############################################################
## MOD History:
##
## see mod history in main install file
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
styles/ubuntu/template/overall_header.html

#
#-----[ FIND ]------------------------------------------
# note: actual line is longer
<a href="{U_SEARCH_NEW}"><img src="./styles/ubuntu/theme/images/bullet.gif" border="0"/>{L_SEARCH_NEW}</a>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
<a href="{U_SEARCH_NEW}"><img src="./styles/ubuntu/theme/images/bullet.gif" border="0"/>{L_SEARCH_NEW}</a>

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<!-- IF S_INC_UNREAD_LINK --><!-- IF S_EXISTS_UNREADS -->&nbsp;&nbsp;<a href="{U_SEARCH_UNREAD}">{L_VIEW_UNREADS}</a><!-- ELSE -->&nbsp;&nbsp;<a href="{U_SEARCH_UNREAD}">{L_NO_UNREADS}</a><!-- ENDIF --><!-- ENDIF -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
      <!-- start mod view or mark unread posts (and end mod too) ... added unread references in the preceding line -->

#
#-----[ FIND ]------------------------------------------
# note: actual line is longer
<a href="{U_SEARCH_NEW}"><img src="./styles/ubuntu/theme/images/bullet.gif" border="0"/>{L_SEARCH_NEW}</a>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
<a href="{U_SEARCH_NEW}"><img src="./styles/ubuntu/theme/images/bullet.gif" border="0"/>{L_SEARCH_NEW}</a>

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<!-- IF S_INC_UNREAD_LINK --><!-- IF S_EXISTS_UNREADS -->&nbsp;&nbsp;<a href="{U_SEARCH_UNREAD}">{L_VIEW_UNREADS}</a><!-- ELSE -->&nbsp;&nbsp;<a href="{U_SEARCH_UNREAD}">{L_NO_UNREADS}</a><!-- ENDIF --><!-- ENDIF -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
      <!-- start mod view or mark unread posts (and end mod too) ... added unread references in the preceding line -->

#
#-----[ OPEN ]------------------------------------------
#
styles/ubuntu/template/search_results.html

#
#-----[ FIND ]------------------------------------------
#
   <td colspan="2"><span class="titles"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></span><br /></td>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
<br />

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<!-- IF S_SHOW_MARK_FORUMS_LINK --><p class="gensmall"><a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a></p><br /><!-- ENDIF -->

#
#-----[ OPEN ]------------------------------------------
#
styles/ubuntu/template/ucp_pm_viewmessage.html

#
#-----[ FIND ]------------------------------------------
# Note: actual line is longer
               <td class="gensmall" align="{S_CONTENT_FLOW_END}">

#
#-----[ BEFORE, ADD ]------------------------------------------
#
               <td valign="bottom"><a href="{U_MARK_UNREAD}" class="gensmall" title="{L_MARK_PM_UNREAD}">{L_MARK_PM_UNREAD}</a></td>
               <!-- start mod view or mark unread posts (and end mod too) ... added preceding line -->

#
#-----[ OPEN ]------------------------------------------
#
styles/ubuntu/template/viewtopic_body.html

#
#-----[ FIND ]------------------------------------------
#
                     <td class="gensmall" align="{S_CONTENT_FLOW_END}">

#
#-----[ BEFORE, ADD ]------------------------------------------
#
                     <!-- IF S_INC_UNREAD_LINK --><td valign="bottom"><a href="{postrow.U_MARK_UNREAD}" class="gensmall" title="{L_MARK_POST_UNREAD}">{L_MARK_POST_UNREAD}</a></td><!-- ENDIF -->
                     <!-- start mod view or mark unread posts (and end mod too) ... added mark_post_unread references in the preceding line -->

#
#-----[ DIY INSTRUCTIONS ]-------------------------------------------------
#
Go into the ACP styles section and click 'refresh' (and confirm) for
ubuntu's templates.

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Postby sovietpop » Sun Feb 24, 2008 11:55 pm

Thats probably very good advice Alan. Thanks for the code, I'll have a go implementing it tomorrow.
sovietpop
Registered User
 
Posts: 14
Joined: Fri Nov 16, 2007 5:15 pm

Re: View or mark unread posts

Postby asinshesq » Mon Feb 25, 2008 12:05 am

sovietpop wrote:Thats probably very good advice Alan. Thanks for the code, I'll have a go implementing it tomorrow.

I'm glad you took it that way...I intended it to be helpful but I realize that it may have sounded snippy. Good luck.
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Postby Forke » Wed Feb 27, 2008 3:56 am

I've just installed this mod, and let me tell you that it is GREAT!

One of the best ones I've seen so far. I'm sure it'll be one of the most popular.

Thanks for making this mod! :D
My first validated mod!
Adaptive Quick Search
Forke
Registered User
 
Posts: 102
Joined: Fri Feb 08, 2008 6:03 am

Re: View or mark unread posts

Postby asinshesq » Wed Feb 27, 2008 2:51 pm

Forke wrote:I've just installed this mod, and let me tell you that it is GREAT!

One of the best ones I've seen so far. I'm sure it'll be one of the most popular.

Thanks for making this mod! :D

Thanks for letting me know you like it (that feedback is much appreciated). I'm curious, though, about why this mod turns out to be so useful for your board (since to me it seem somewhat useful but not earthshattering):

- Is it mostly the ability to get a simple list of unreads? Or do you also find the ability to mark a post unread useful? (The list was easy to code but the part allowing you to mark posts unread was pretty tough.)

- Does the part that allows you to see unread pms in their own folder (and mark pms unread) matter much to you?
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Postby Renodil » Wed Feb 27, 2008 3:14 pm

I don't see any change. Could I see a demo?
User avatar
Renodil
Registered User
 
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am

Re: View or mark unread posts

Postby asinshesq » Wed Feb 27, 2008 3:27 pm

Renodil wrote:I don't see any change. Could I see a demo?

Take a look on the index page of your forum right next to the "View new posts" link. You should see a "View unread posts" link...is it there? And at the bottom of each post in viewtopic, do you see a "Mark post as unread" link?

If not, you either didn't make the changes the mod tells you to make (or didn't upload them to your server), or perhaps you forgot to clear the template cache like the mod tells you to do in the DIY at the end.
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Postby Renodil » Wed Feb 27, 2008 4:03 pm

No and no.

Would the New post count on index by christian be interfering?
User avatar
Renodil
Registered User
 
Posts: 668
Joined: Mon Nov 14, 2005 8:48 am

Re: View or mark unread posts

Postby asinshesq » Wed Feb 27, 2008 4:24 pm

Renodil wrote:Would the New post count on index by christian be interfering?

No idea. What's the post count on index mod and where is it? There is no user named 'christian' on phpbb.com.

[edit: I just found the mod you are talking about. There is no conflict, but they both change the same line in index_body.html so I am guessing you made those changes wrong. Please check your edits again. Also, please consider whether your users will be totally confused by a link for new posts with a number and another link for unread posts...see paragraph (4) of the author's notes for details.]
Last edited by asinshesq on Wed Feb 27, 2008 8:29 pm, edited 3 times in total.
asinshesq
QA Team
 
Posts: 6161
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Next

Return to [3.0.x] MOD Database Releases

Who is online

Users browsing this forum: No registered users and 11 guests