Jump to content

  •  

  • Tutorial info Visit support topic

    • Added on: Feb 10 2009 05:24 PM
    • Views: 949


    * * * * *
    1 Ratings

    Change topic forum when move a file

    Posted by Adriano Faria on Feb 10 2009 05:24 PM
    When you move a file to another category, IP.Downloads doesn't change the forum of topic created.

    To change that, open sources/components_public/downloads/moderate.php and find:

    				$this->ipsclass->DB->do_update( "downloads_files", array( 'file_cat' => $newcatid ), "file_id=".$id );
    Add above:

    				$newcat = $this->catlib->cat_lookup[ $newcatid ];
    				 if ( $newcat['coptions']['opt_topice'] == 1 )
    				 {
    					 $this->ipsclass->DB->do_update( "topics", array( 'forum_id' => $newcat['coptions']['opt_topicf'] ), "tid=".$file['file_topicid'] );
    				 }
    It's done... now, if you move a file and new category allows to create a new topic, the topic created will be moved to.

    :)
    Powered by Tutorials 1.3.1 © 2012, by Michael McCune