[CDB] Mark Post Unread

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3209
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

[CDB] Mark Post Unread

Post by kasimi » Thu May 07, 2015 5:41 pm

Extension Name: Mark Post Unread (requires at least phpBB 3.1.4-RC1)

Author: kasimi

Description: Adds a 'Mark post unread' button to each post in viewtopic.php, adds a 'Mark forums read' link to the 'Unread posts' search results and optionally changes the 'Unread posts' search link text to either 'No unread posts' or 'Unread posts in X topics'.

This extension uses code of asinshesq's MOD View or mark unread posts for phpBB 3.0. Thanks goes to him for assisting in porting it to a 3.1 extension. Also I would like to thank Wolfsblvt who helped requesting and implementing the necessary events for this extension.

Screenshots:
  • Viewtopic
    Image
  • Quick links
    Image
  • Configuration page in the ACP
    Image
Download v1.1.1: https://github.com/kasimi/phpbb-ext-mar ... v1.1.1.zip

Repository: https://github.com/kasimi/phpbb-ext-markpostunread

Installation:
  1. Copy the contents of the archive to /ext/kasimi/markpostunread.
    Make sure the file /ext/kasimi/markpostunread/composer.json is present.
  2. Navigate to the ACP » Customise » Manage extensions page.
  3. Click Enable next to Mark Post Unread in the Disabled Extensions section.
Changelog:
  • 2015-05-07 v1.0.0 released
  • 2015-12-07 v1.0.1 released
    1. Added option to disable "Mark forums read" on search results page (thought I had committed the code for this to v1.0.0 but I forgot)
    2. Added error check that prevents enabling the "Mark post unread" button if server-side topic marking is disabled
    3. Fixed wording of ACP preferences
  • 2016-01-13 v1.0.2 released
    1. Removed 'Mark all posts read' link on search result page. phpBB 3.1.7 has the link included by default in the prosilver style.
    2. Removed BOM from ACP module file
    3. Extension status bumped to RC
  • 2017-01-25 v1.1.0 released
    1. Compatible with phpBB 3.2.x
    2. Added permission to control who is allowed to mark posts unread (thanks dmzx)
    3. Improved performance when including mark unread button
    4. Fixed updating of Unread posts search link
    5. Converted template files to Twig syntax
    6. Updated description in composer.json
  • 2017-04-27 v1.1.1 released
    1. Fixed a bug that allowed users to find out sensitive information about posts.
    2. Minor code cleanup
Last edited by kasimi on Wed Jan 13, 2016 12:34 am, edited 3 times in total.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [BETA] Mark Post Unread

Post by asinshesq » Thu May 07, 2015 7:09 pm

Wow, thanks for doing this. At some point I will test it. For now, here are some thoughts on the options you included (and btw, I think it's great that you added options rather than providing notes the way I did on how to edit the mod to do these things):

- The text in the option allowing admins to limit the age of a topic the user can mark unread to a number of days old is patterned after the note I included in my readme file. You may want to mention that giving users the ability to mark posts unread not only takes up db space (as you already say) but also may slow down big boards with lots of topics.

- Why is it useful to give admins an option not to include a mark forums read link on the page that lists unread posts? I would have thought people will always want that link but maybe I'm missing something.

Does the mark unread feature only work via the db track forum and topics entries or does it allow users who are guests to mark unread via cookie entries? If only via the db, you may want to explain that somewhere.

Does the mark unread feature work as reliably as the version for phpbb 3.0 or does it have some new bugs that mess things up in certain circumstances?

Are you planning on adding back the ability to mark pms unread? If not, is there someone else that is planning to write an extension to do that?

Drakken
Registered User
Posts: 144
Joined: Thu Jun 12, 2003 6:59 pm
Contact:

Re: [BETA] Mark Post Unread

Post by Drakken » Fri May 15, 2015 8:34 pm

I'm not seeing the Mark Forums Read link in the search results or in the configuration page. Was this removed?

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Mon Aug 03, 2015 1:53 pm

Hi there,

Is this extension still in development (in order to be validated/released one day) or has it been abandoned ?

Thanks for your answer.

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24715
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [BETA] Mark Post Unread

Post by Paul » Mon Aug 03, 2015 2:56 pm

This topic has been marked as [ABD] - Abandoned as the extension author has not been active recently. If the extension author wishes to continue development, please PM anyone on the Extensions Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this extension, or any other extension that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Extensions Team
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24715
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [ABD] Mark Post Unread

Post by Paul » Mon Dec 07, 2015 1:37 pm

Reopend as requested.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3209
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [BETA] Mark Post Unread

Post by kasimi » Mon Dec 07, 2015 2:28 pm

Thanks Paul!

See first post for new version v1.0.1
Drakken wrote:I'm not seeing the Mark Forums Read link in the search results or in the configuration page. Was this removed?
See changelog for v1.0.1. Sorry about that. :) The Mark Forums Read link is above the unread posts list. The original MOD had the link on the left side. In this extension it is on the right side to be consistent with the Mark Forums Read links on the index and viewforum pages.

Thanks asinshesq for your comments and your great MOD without which putting this extension together wouldn't have been nearly as straightforward as it was.
asinshesq wrote:You may want to mention that giving users the ability to mark posts unread not only takes up db space (as you already say) but also may slow down big boards with lots of topics.
asinshesq wrote:Does the mark unread feature only work via the db track forum and topics entries
Both added to v1.0.1.
asinshesq wrote:Why is it useful to give admins an option not to include a mark forums read link on the page that lists unread posts?
Sooner or later someone would have requested to remove that link, I'm sure. I don't think it's bad to have options. The more the merrier.
asinshesq wrote:does it have some new bugs that mess things up in certain circumstances?
There is one minor glitch still present that I also experienced in the MOD for 3.0:
  1. Open a topic with multiple pages, all posts are marked read
  2. Pick any post, except for posts on the last page, and mark it unread
  3. After being redirected to viewforum, that topic has the unread icon, as expected
  4. Click on "View first unread post", you get straight to the post you've just marked unread, as expected
  5. Go back to viewforum
  6. The topic still has the unread icon!
  7. Click on "View first unread post" again, you get to the first post of the last page
  8. Go back to viewforum
  9. Now the topic doesn't have the unread icon anymore
I haven't looked into this yet.
asinshesq wrote:Are you planning on adding back the ability to mark pms unread?
No, not as this time. If someone else feels up to the challenge and wants to integrate it into this extension, feel free to contact me.

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Tue Dec 22, 2015 3:40 pm

Great, thanks for this new version ^^

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Tue Dec 29, 2015 4:42 pm

I finally tried the new version on my test forum but I get a fatal error when I try to click on the "Configuration" link in the ACP :

http://nsa37.casimages.com/img/2015/12/ ... 223225.jpg

My test forum version is 3.1.6 (but the previous version of this extension was still working on it).

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3209
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [BETA] Mark Post Unread

Post by kasimi » Tue Dec 29, 2015 4:49 pm

Can you post the first 20 lines of that file markpostunread_module.php here? I suspect there was a problem while you uploaded the file to your server.

For comparison, it should look like this: https://github.com/kasimi/phpbb-ext-mar ... module.php

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Tue Dec 29, 2015 4:54 pm

Here are the first 25 lines of the file :

Code: Select all

<?php

/**
 *
 * @package phpBB Extension - Mark Post Unread
 * @copyright (c) 2015 kasimi
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
 *
 */

namespace kasimi\markpostunread\acp;

class markpostunread_module
{
	public $u_action;

	protected $setting_prefix = 'kasimi.markpostunread.';

	protected $settings = array(
		'version'				=> null,
		'enabled'				=> 0,
		'max_days'				=> 0,
		'unread_posts_link'		=> 0,
		'mark_forums_link'		=> 0,
	);
I looked at yours and I couldn't find a difference.

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3209
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [BETA] Mark Post Unread

Post by kasimi » Tue Dec 29, 2015 5:04 pm

I found the problem. No idea how the BOMs sneaked into those files, but the 2 classes responsible for ACP stuff contained them. I added a fixed version 1.0.1, please download again.

Thanks for reporting this! :)

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Tue Dec 29, 2015 5:14 pm

Thanks, it works now ;)

I'll get back to you if I find something else ;)

didou116
Registered User
Posts: 38
Joined: Wed Jul 22, 2015 3:16 pm

Re: [BETA] Mark Post Unread

Post by didou116 » Tue Dec 29, 2015 7:00 pm

Hi again,

If I understand things correctly, it's your extension that adds a link "Mark forums read" on the search results page.

There's a little overlapping between the french text and the arrow icon (I don't know if it's the same in english) :

Image

But when my mouse is on the link, then there is no more overlapping :

Image


My style is a kind of "red prosilver" made thanks to Colorize it.

Do you think there's something you could do ?


Edit : I realize that there's no arrow icon for the original link "Mark forums read" located on the index. Maybe the solution would be to remove the icon on the search results page too ?

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3209
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: [BETA] Mark Post Unread

Post by kasimi » Tue Dec 29, 2015 8:41 pm

Thanks so much for testing!
didou116 wrote:it's your extension that adds a link "Mark forums read" on the search results page.
Correct. This feature was ported from the MOD for phpBB 3.0. However, phpBB 3.1.7 will have the link included by default in the prosilver style. Once phpBB 3.1.7 is out, I will remove the link from this extension and release an updated version. That's why I think putting any effort into this at this time is not worth it.

Locked

Return to “Extensions in Development”

Who is online

Users browsing this forum: </Solidjeuh>, Mohammed AlSarsawi, nou nou, odman, skybound, Татьяна5 and 24 guests