Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch adds URLs in the form of 'node/readall' and 'node/readall/$tid' that mark all nodes, or all nodes within a given category, as read by the current user.
This also adds "mark all read" and "mark this forum read" links to the forums.
Comment | File | Size | Author |
---|---|---|---|
#3 | markasread.module | 1.37 KB | Wesley Tanaka |
mark_read.patch | 2.25 KB | pyromanfo | |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commented1) new features go into cvs, not stable
2) does not conform to codign standards
3) uses REPLACE, does not work with pgsql
I recommend making this a contrib module if possible.
Comment #2
Marandb CreditAttribution: Marandb commentedI am very interested in seeing this / functionality added...
I have tried to apply the patch above & it says "There was nothing but garbage found". Any updates on this?
Thank alot,
-- Marand B
Comment #3
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedI didn't like the way that this was marking things as a result of a GET request, so I modified it to accept POST instead.
Added this code to template.php to create the associated UI buttons.
Comment #4
Jaza CreditAttribution: Jaza commentedAgreed, this belongs in a contrib module (perhaps someone has written a contrib module for this by now? :P).
Closing issue.
Comment #5
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedHow would one add a button to the forum page to trigger the "mark as read" action from a module? forum.module does not seem to ever call module_invoke()
Comment #6
Frando CreditAttribution: Frando commentedhook_link_alter() is your friend, at least in Drupal 5.x
Comment #7
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedI believe that hook_link etc are insufficient because:
1. This should be a POST button, not a link, because it modifies data
2. Links are associated with nodes and comments. The button needs to be on the main forum page and on each individual forum page
Comment #8
magico CreditAttribution: magico commentedComment #9
Marandb CreditAttribution: Marandb commentedAny chance of anyone updating this for 5.x? IMO this is a much needed and missing feature in drupal. Without this functionality on any sizeable site the "Updated" notations become somewhat worthless. Just my opinion.
Regardless, how can we implement this in drupal 5.x?
Thanks,
-- Marandb
Comment #10
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedI just looked through the module in #3 -- it looks like it should still work in 5.0 as well as it did before (i.e. mysql specific, and what appears to be a few bugs)
Also see: http://drupal.org/node/63416
Comment #11
Wesley Tanaka CreditAttribution: Wesley Tanaka commentedIs this bug a duplicate of bug 1672?
> Any chance of anyone updating this for 5.x?
I see -- the 4.6 specific code is the snippet in comment #3
You might try out these instructions: http://ofb.net/~wtanaka/drupal/markasread
Comment #12
catchmarking as duplicate:
http://drupal.org/node/1762
Comment #13
jaydub CreditAttribution: jaydub commentedThis is in relation to the module markasread available at http://wtanaka.com/drupal/markasread
I unfortunately do not have a PostgreSQL drupal setup at the moment to verify this test but I believe this should work...
I modified the REPLACE INTO query to a switch test for db_type and used a slightly different query for PostgreSQL. Adding a join to the history table for the user will ensure that the INSERT will not attempt to insert duplicate rows. At least that's the theory :)
Comment #14
raintonr CreditAttribution: raintonr commented+1 for this, although...
We have a 'my unread' view on site. Kindof like the regular 'tracker' page but with only nodes/comments unseen by user listed.
It would therfore be better, IMHO, to have this module:
- Ask for simple confirmation
- Show a 'all posts marked as read' info message rather than as a page
- Redirect back to the previous page after this
This shouldn't be too hard. We're on 5.x so if I get round to sorting this will post the module here.
Comment #15
raintonr CreditAttribution: raintonr commentedThe given SQL wasn't working here so I tweaked it as follows:
As for the request for a confirmation & redirect. Well - the redirect was easily handled with a change to the
drupal_goto
function and the confirmation by adrupal_set_message
call.I added a link to the footer of our 'my unseen' view which asks for confirmation before marking nodes. Of course the input format has to be 'php' for this to work: