Jump to content

  •  

  • Tutorial info Visit support topic

    • Added on: Sep 11 2010 11:15 AM
    • Date Updated: Sep 11 2010 11:16 AM
    • Views: 611
     


    * * * * *
    0 Ratings

    Mark IP.Downloads support topics as read upon creation

    When a new file is either submitted, or approved by a mod, the topic is marked as unread. Follow this tutorial, and the topics will be marked as unread.

    Posted by Martin on Sep 11 2010 11:15 AM
    In my opinion, support topics should be marked as unread for both the submitter and approver, as both know what the content of that topic is. This have been suggested to IPS, but they have currently not done anything about it, as this is an easy thing to add.
    Due to the way item marking works, it is not possible to mark things not belonging to the current user. This tutorial will therefor only mark the topic as read for either the submitter or the approver of the submitted file.

    One file edit is required for this tutorial, please back up that file before proceeding with the edit.


    Open ./admin/applications_addon/ips/downloads/sources/classes/topics.php
    Find:
    $this->DB->update( "downloads_files", array( 'file_topicid' => $this->topic['tid'], 'file_topicseoname' => $this->topic['title_seo'] ), "file_id=" . $file['file_id'] );
    
    Add below:
    		//-----------------------------------------
    		// Mark as read for current viewer
    		//-----------------------------------------
    		
    		$this->registry->classItemMarking->markRead( array( 'forumID' => $this->topic['forum_id'], 'itemID' => $this->topic['tid'] ), 'forums' );
    Save and upload

    Powered by Tutorials 1.4.1 © 2012, by Michael McCune