1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Please donate today & help us with our growing server costs or buy premium for access to our premium products
    Dismiss Notice

Free Create a "trash forum" for deleted theme

Discussion in 'Xenforo Template Mods & Extras' started by HAWK, Mar 23, 2016.

  1. HAWK

    HAWK Administrator Staff Member ADMIN

    Likes Received:
    580
    Trophy Points:
    113
    Gender:
    Male
    This modification will make so that all deleted threads will fall into a special section. ie basket


    create new forum, like "Trash"

    open: xen\library\XenForo\Model\InlineMod\Thread.php

    find:
    Code:
    $dw->setExtraData(XenForo_DataWriter_Discussion::DATA_DELETE_REASON,$options['reason']);
    $dw->set('discussion_state', 'deleted');
    $dw->save();
    replace for:
    Code:
    $dw->setExtraData(XenForo_DataWriter_Discussion::DATA_DELETE_REASON, $options['reason']);
    $dw->set('discussion_state', 'deleted');
    $dw->set('node_id', '9999');
    $dw->save();


    open: xen\library\XenForo\Model\Thread.php

    find:
    Code:
    $dw->setExtraData(XenForo_DataWriter_Discussion::DATA_DELETE_REASON,$options['reason']);
    $dw->set('discussion_state', 'deleted');
    $dw->save();
    replace for:
    Code:
    $dw->setExtraData(XenForo_DataWriter_Discussion::DATA_DELETE_REASON, $options['reason']);
    $dw->set('discussion_state', 'deleted');
    $dw->set('node_id', '9999');
    $dw->save();
    9999 - change it for you "Trash" forum id
     
    princedusat likes this.
  2. striarc

    striarc Registered REGISTERED

    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Done :) TY
     
  3. dkv

    dkv Registered REGISTERED

    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    ty :) very much
     
  4. 4pf3ls4ft

    4pf3ls4ft Registered REGISTERED

    Likes Received:
    0
    Trophy Points:
    1
    done thanks bro!
     

Share This Page