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.
User avatar
Savigny
Registered User
Posts: 7
Joined: Sun Mar 23, 2008 1:42 am

Re: View or mark unread posts

Post by Savigny »

Image
User avatar
parasolx
Registered User
Posts: 146
Joined: Wed Apr 23, 2008 8:52 am
Location: Malaysia
Name: Hadafi

Re: View or mark unread posts

Post by parasolx »

implement counter coding before, doesn't effect my board. maybe because my server can handle 215 scripting one time.
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian

Re: View or mark unread posts

Post by marian0810 »

I just installed your mod (1.0.4) on a new phpBB3.0.4 board and I thought everything worked great, until my users pointed out to me that the "mark all forums read" link isn't working :o I'm assuming I must have done something wrong, but I can't figure out what it is :?
This is the first part of my search_results.html

Code: Select all

<form method="post" action="{S_SEARCH_ACTION}">

<table width="100%" cellspacing="1">
<tr>
	<td colspan="2"><span class="titles"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></span><br /><!-- IF S_SHOW_MARK_FORUMS_LINK --><p class="gensmall"><a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a></p><br /><!-- ENDIF --></td>
</tr>
<tr>
	<td class="genmed"><!-- IF SEARCH_TOPIC -->{L_SEARCHED_TOPIC}: <a href="{U_SEARCH_TOPIC}"><b>{SEARCH_TOPIC}</b></a><br /><!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_SEARCHED_FOR}: <a href="{U_SEARCH_WORDS}"><b>{SEARCH_WORDS}</b></a><!-- ENDIF --><!-- IF IGNORED_WORDS --> {L_IGNORED_TERMS}: <b>{IGNORED_WORDS}</b><!-- ENDIF --></td>
	<td align="{S_CONTENT_FLOW_END}"><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}: </span><input type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
</tr>
</table>
Did I miss something, or should I look somewhere else?

EDIT: actually it doesn't appear to be an html-problem because it isn't working in prosilver either...
You and me, time and space. You watch us run!
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq »

marian0810 wrote:I just installed your mod (1.0.4) on a new phpBB3.0.4 board and I thought everything worked great, until my users pointed out to me that the "mark all forums read" link isn't working :o I'm assuming I must have done something wrong, but I can't figure out what it is :?...
You need to make a change that is required to dovetail changes made in phpbb3 since this mod was released. See http://www.phpbb.com/community/viewtopi ... 5#p7824265

There are a number of other changes we've made along the way (all described somewhere in this topic). If you want to use the current version there's a link in this post: http://www.phpbb.com/community/viewtopi ... 5#p8021335
That new version is not yet validated, but I submitted it for validation a few weeks ago so hopefully it will get validated fairly soon.
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian

Re: View or mark unread posts

Post by marian0810 »

Ah, right :idea: Thank you!

Now I have one more question: is there a way to make this show up in viewonline.php as "reading unread topics" instead of "searching the forums"?
You and me, time and space. You watch us run!
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq »

marian0810 wrote:Now I have one more question: is there a way to make this show up in viewonline.php as "reading unread topics" instead of "searching the forums"?
Online pages are tracked by user sessions. I've never looked into the code to figure out if there is a hack along the lines you ask about, so I don't know how easy that would be. I suppose a quick fix would be to change the definition of searching forums in language/en/common.php to read something like this:

Code: Select all

	'SEARCHING_FORUMS'			=> 'Reading unread topics or searching forums',
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian

Re: View or mark unread posts

Post by marian0810 »

Actually the reason I ask is because I'd like to know which one of those the user is actually doing at that moment :mrgreen:
But either way I'd like to thank you for a great mod, you've made my users very happy :D
You and me, time and space. You watch us run!
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: View or mark unread posts

Post by PaulusB »

When u click on the mark read as unread the button is not working

I have treid this fix but http://www.phpbb.com/community/viewtopi ... 5#p7824265 the link is now gone what is the correct fix i am using phpbb 3.0.4
You do not have the required permissions to view the files attached to this post.
User avatar
PaulusB
Registered User
Posts: 232
Joined: Sun May 28, 2006 2:08 pm
Location: Holland

Re: View or mark unread posts

Post by PaulusB »

Oke this one was missing 'S_SHOW_MARK_FORUMS_LINK' => true,
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian

Re: View or mark unread posts

Post by marian0810 »

PaulusB wrote:I have treid this fix but http://www.phpbb.com/community/viewtopi ... 5#p7824265 the link is now gone what is the correct fix i am using phpbb 3.0.4
:?: Both links still work fine for me. And the fix worked like a charm.

Tazmanian wrote:I just found it that something is not working.
It works on my 3.0.2 forum (still have a backup working on 3.0.2)

When I go to 'View unread messages' there is a link you can click on 'Mark all forums as read' but if I click on that the unread messages don't disappear.

I think there is a changes in the code since 3.0.3 for mark the forums as read.
I see there is a difference in the standard link on the forum index for marking forums as unread:
in 3.0.2 -> /forum/index.php?mark=forums
in 3.0.3 -> /forum/index.php?hash=af835669&mark=forums

asinshesq, can you take a look and update that for 3.0.3?

EDIT:
I think this have to be changed in /includes/functions_view_or_mark_unread_posts.php

FIND:

Code: Select all

'U_MARK_FORUMS'				=> append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums'),
REPLACE WITH:

Code: Select all

'U_MARK_FORUMS'				=> append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums'),
Asinshesq, can you confirm that this is correct?
You and me, time and space. You watch us run!
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq »

PaulusB wrote:Oke this one was missing 'S_SHOW_MARK_FORUMS_LINK' => true,
Are you saying that you found the problem and all is fixed now?
posh
Registered User
Posts: 7
Joined: Tue Apr 15, 2008 12:59 pm

Re: View or mark unread posts

Post by posh »

asinshesq wrote: Depends where you want it. You'll need to experiment, but if you want the "View your unread posts" link to appear on every prosilver page in the header (not just on the index page), one possibility is this:

Code: Select all

OPEN
style/prosilver/template

FIND
					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>

AFTER, ADD
					<!-- IF S_INC_UNREAD_LINK --><!-- IF S_EXISTS_UNREADS --> &bull; <a href="{U_SEARCH_UNREAD}">{L_VIEW_UNREADS}</a><!-- ELSE --> &bull; <a href="{U_SEARCH_UNREAD}">{L_NO_UNREADS}</a><!-- ENDIF --><!-- ENDIF -->
In tinkering with this, note that &bull; is code for a bullet point so if you don't want a bullet point you should leave that out. If you want to skip a line before or after the link you are adding, <br /> is the code for a skipped line. Finally, note that you would presumably want to undo the change the mod otherwise has you make to style/prosilver/template/index_body.html so that you don't end up with two links that are identical on the index page.
I really want this slight mod on my forum. Where do I put the code?

I'm going --> style/prosilver/template/ ?????
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq »

posh wrote:
asinshesq wrote: Depends where you want it. You'll need to experiment, but if you want the "View your unread posts" link to appear on every prosilver page in the header (not just on the index page), one possibility is this:

Code: Select all

OPEN
style/proxilver/templates/overall_header.html

FIND
					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>

AFTER, ADD
					<!-- IF S_EXISTS_UNREADS --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ELSE --> &bull; <a href="{U_SEARCH_UNREAD}">{L_NO_UNREADS}</a><!-- ENDIF -->
In tinkering with this, note that &bull; is code for a bullet point so if you don't want a bullet point you should leave that out. If you want to skip a line before or after the link you are adding, <br /> is the code for a skipped line. Finally, note that you would presumably want to undo the change the mod otherwise has you make to style/prosilver/template/index_body.html so that you don't end up with two links that are identical on the index page.
I really want this slight mod on my forum. Where do I put the code?

I'm going --> style/prosilver/template/ ?????
styles/prosilver/template/overall_header.html
Last edited by asinshesq on Mon Mar 08, 2010 3:39 pm, edited 1 time in total.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28846
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier

View or mark unread posts

Post by Paul »

MOD Updated to version 1.0.5
See first post for Download Link
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: View or mark unread posts

Post by asinshesq »

Paul wrote:MOD Updated to version 1.0.5
See first post for Download Link
Thanks for posting that, Paul (and thank you or whoever else did the validation). Two in one day was really nice to see!

Anyway, here is the changelog from the last validated version:

Code: Select all

##  2008-12-29 - Version 1.0.5c
##			cleaned up the code in the mark_post_unread() function
##			(should speed up the db queries) and re-wrote the
##			unread_tracking_info.txt file that appears in the readme folder
##			(if you already have 1.0.5 or 1.0.5a installed you just need to
##			replace functions_view_or_mark_unread_posts.php and redo
##			the changes to viewtopic that the install.xml file tells you to make)
##
##  2008-12-24 - Version 1.0.5b
##			revised code to deal with global announcements more dependibly
##			and revised various readme and notes files (if you already
##			have 1.0.5 or 1.0.5a installed you just need to replace
##			functions_view_or_mark_unread_posts.php and re-do the changes to
##			viewtopic that the install.xml file tells you to make)
##
##  2008-12-10 - Version 1.0.5a
##			added changes to dovetail with phpbb3.0.3 changes
##
##			fixed bug that caused unreads to show up in unread box even if
##			user is over the pm limit and the unread pm should really
##			only appear in the hold box
##
##			fixed bug that prevented a forum from being shown as unread on
##			the index page if the only unread post in the forum is the 
##			latest post in the forum
##
##			fixed bug that sometimes caused the link not to toggle to
##			"View your unread posts" when the user is in viewforum for a 
##			category or forum that has subforums
##
##			added code to supress 'move to unreadbox' entry in pm dropdown menu
##
##			re-did code in functions_view_or_mark_unread_posts.php to properly
##			deal with unread global announcments (but note that this will take
##			an extra query so people with huge boards who want to save a query
##			should read the authors notes carefully)
##
##			Note: all changes from version 1.0.4 to 1.0.5a have been posted
##			on the phpbb.com topic for this mod on or before December 10, 2008.
##			If you have already made these changes you do not need to upgrade
##			your mod installation other than as set forth in the entry for
##			version 1.0.5b above, but for people who have not made these changes
##			I include an upgrade_1-0-4_to_1-0-5b mod in the contrib folder

Return to “[3.0.x] MOD Database Releases”