Jump to content

Don't make votes in polls mark as unread


TSP

Recommended Posts

Looks to me like I would just need to change this query a bit, to not update last_post


$this->DB->update( 'topics', array( 'last_vote' => $this->topic['last_vote'] ), 'tid=' . $this->topic['tid'] );
 



This shouldn't cause any problems, right? Would that be all that would be needed to do?

Appearantly this is not enough, do anyone else have an idea? Do last_vote somehow affect the topic marking system by itself?

Link to comment
Share on other sites

Ok, I decided to keep the change.

There is two options here, for those who want to change it. Either comment out the full update statement, so neither last_vote or last_post updates when a vote is added. This is the simplest solution.

If you however want last_vote to be updated, then you have to also change this file: www/admin/applications/forums/sources/classes/topics.php

Find:

                /* Check against it */
                if ( $topic['poll_state'] AND ( $topic['last_vote'] > $topic['last_post'] ) )
                {
                        $topic['_hasUnread'] = ( $lastMarked < $topic['last_vote'] ) ? true : false;
                }
                else
                {
                        $topic['_hasUnread'] = ( $lastMarked < $topic['last_post'] ) ? true : false;
                }

Replace with: (Comment out the if/else statement and just paste what's inside the else below it)

                /* Check against it */
                /* HW_CUSTOM do not mark polls as unread when they have new votes
                if ( $topic['poll_state'] AND ( $topic['last_vote'] > $topic['last_post'] ) )
                {
                        $topic['_hasUnread'] = ( $lastMarked < $topic['last_vote'] ) ? true : false;
                }
                else
                {
                        $topic['_hasUnread'] = ( $lastMarked < $topic['last_post'] ) ? true : false;
                } */
                $topic['_hasUnread'] = ( $lastMarked < $topic['last_post'] ) ? true : false;
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...