1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up a Trash Forum

Set up a Trash Forum

  1. Vincent

    Vincent Well-Known Member

    VincentU submitted a new resource:

    Setting up a Trash Forum (version 1.0) - Set up a Trash Forum

    Read more about this resource...
     
    grizone and Digital Doctor like this.
  2. Digital Doctor

    Digital Doctor Well-Known Member

    +Great idea ...
    +Core
    +Thank you.
     
  3. tafreehm

    tafreehm Well-Known Member

    Good one..
    Question: a deleted post would become a thread in trash forum ?
    How about deleted profile post ?
     
  4. Vincent

    Vincent Well-Known Member

    Nope, it doesn't.
    And I don't want to do it because it is messy and good for nothing :p
     
  5. Liam23

    Liam23 Active Member

    Seems not to be working for me :(

    Edit: Fixed.... :rolleyes:
     
  6. Moddis

    Moddis Active Member

    Awesome!

    What happens if you undelete a post from the trash, will it go back tot he thread/forum it came from?
     
  7. Moddis

    Moddis Active Member

    Just tested and realized that it doesnt actually delete a posts, just moves it to that thread.

    Would it be possible to:
    • Delete the thread AND move it to the trash forum?
    • When moving it, to note from what forum it was moved from?
    Thanks.
     
  8. tyteen4a03

    tyteen4a03 Well-Known Member

    @Moddis

    1. Yes.
    2. What do you mean?

    @VincentU Do you want me to create a proper addon for this?
     
  9. Moddis

    Moddis Active Member

    Well if I decide to undelete it, I would have to guess which forum to put it back into. So if it could remember where it was moved from some how, that would be awesome.
     
  10. tyteen4a03

    tyteen4a03 Well-Known Member

    You mean a redirect?
     
  11. Moddis

    Moddis Active Member

    Im not sure if a permanent redirect can work in that way but basically, if I delete a thread from forum "General Chat", it will get moved to "Trash" forum. So if I decide to restore/undelete it, the thread would know to restore itself in the "General Chat" forum.
     
  12. tyteen4a03

    tyteen4a03 Well-Known Member

    I don't think that can happen without a more advanced addon.
     
  13. Moddis

    Moddis Active Member

    Thanks. It does sound pretty complicated.

    This would be some much easier if there was a built in option to view all deleted threads in from forums.
     
  14. Vincent

    Vincent Well-Known Member

    Hehe, I'm sorry, but I'm working on this already :)
    My apologies!
     
    ge66 likes this.
  15. Moddis

    Moddis Active Member

    Cool!

    As a suggestion, a separate page or view (without actually moving those threads from their original forum) that would list all deleted threads from all forums would be AWESOME!
     
    Last edited: Jun 16, 2013
  16. Yonda

    Yonda Member

    Getting an error:

    #0 /www/library/XenForo/Model/Thread.php(1941): XenForo_Application::handlePhpError(4096, 'Object of class...', '/www/...', 1941, Array)
    #1 /www/library/XenForo/ControllerPublic/Thread.php(1261): XenForo_Model_Thread->deleteThread(3, 'soft', Array)
    #2 /www/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Thread->actionDelete()
    #3 /www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #4 /www/index.php(13): XenForo_FrontController->run()

    ErrorException: Object of class EWRporta_DataWriter_Discussion_Thread could not be converted to string - library/XenForo/Model/Thread.php:1941

    I'm think that that line is the dw->set('diss...

    Anyone know how to fix
     
  17. tyteen4a03

    tyteen4a03 Well-Known Member

    Seems like a clash with XenPorta.
     
  18. tnunndox

    tnunndox New Member

    did you actually manage to get this working as i would be very interested in being able to restore moved thread to their original forum section?
     
    phtvs likes this.
  19. phtvs

    phtvs Member

    Another option is to delete the thread AND move it to the trash forum

    Code:
    find:
    $dw->set('discussion_state', 'deleted');
    below add (xxx is the node where to move the thread)
    $dw->set('node_id', 'xxx');
    Change this in both files
    In library\XenForo\Model\Thread.php and In library\XenForo\Model\InlineMod\Thread.php
     

Share This Page