1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Create a "trash forum" for deleted theme

Discussion in 'Code Modifications [Archive]' started by TheLord, Nov 24, 2010.

  1. TheLord

    TheLord Member

    sorry for my google english :)
    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
     
  2. Kaiser

    Kaiser Well-Known Member

    So they dont get deleted, they just get moved there? I already have a trash forum, I would just stick to the manual way of moving threads. Not really a addon, more of a template modification. Should be moved. Any demo?
     
  3. TheLord

    TheLord Member

    if you delete theme - he are deleted and moved to X forum.
     
  4. ragtek

    ragtek Guest

    You could extend the thread datawriter instead of editing the file.

    If you edit the file, you have to make this on every xenforo upgrade, if you use the listener system, you don't need to touch any file
     
    Vladislav Rastrusny likes this.
  5. Edrondol

    Edrondol Well-Known Member

    Lord, these are not addon releases. They are Template modifications. Wrong board, dude.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Moved to Template Modifications (again).
     
    TheLord likes this.
  7. TheLord

    TheLord Member

    listener system..., how to make her?
     
  8. TheLord

    TheLord Member

    yeah. sorry wrong file
    xen\library\XenForo\Model\InlineMod\Thread.php
     
  9. Vincent

    Vincent Well-Known Member

    Explain me, do SOFT or HARD deleted threads go to that forum?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Hard deleted threads are permanently removed from the database.
     
  11. TheLord

    TheLord Member

    update
     
  12. Vladislav Rastrusny

    Vladislav Rastrusny Active Member

    Actually, it looks more like Code modification, not really a template one.

    It also bears a small potential danger because for that you need to replace delete() method with your own completely. If Kier will add or change something vital there, forum will malfunction after corresponding upgrade.
     
  13. twhiting9275

    twhiting9275 Active Member

    Exactly. This isn't a "template mod", this has nothing to do with templates, it's a code modification.

    Doesn't seem to work with beta 4, for whatever reason. Changed the node, still doesn't work.
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    There isn't a code modification forum though and it's not an add-on so this is the only forum where threads of this nature can currently be placed.
     
  15. Vincent

    Vincent Well-Known Member

    Can you take some of your precious time for me and create an addon for this? With 2 options "Enable or Disable" and "What forum"? :)
    Because I'm scared that when I overwrite my xenForo files with an update, this file will also be overwritten and than it'll be a mess because they're not in the trash forum but in the regular forum.
     
  16. ragtek

    ragtek Guest

    We thought that we would get much more donations (to be honest, it was much better on vb.org) for the released add-ons (10 released add-ons and only 2 donations!), so we're not sure if we'll spend more of the precious time for releasing & supporting free add-ons.It's takes too much time.
    Sorry.
     
    Darkimmortal likes this.
  17. Vincent

    Vincent Well-Known Member

    Okay :(
     
  18. Bain

    Bain Active Member

    What did you expect? XF is just barely in their RC1 phase of version 1.
    As time goes along, more people will purchase XF & move away from the outdated vBulletin or other competitors.
    If you cease creating add-ons then you are doing yourself a diservice as well as the XF modding community.

    It is also possible that not many people found your add-ons worthy of donation.
    It is also possible that there may be some, who would donate but you don't accept other payment options such as google checkout.
    Paypal is not as popular as it once was due to their illegal activities and no way to enforce them to uphold to banking laws.
     
  19. Mutt

    Mutt Well-Known Member

    i like the recycling bin for deleted threads. sometimes I take them down until I have time to work on them & put them back. with the current delete system I feel like threads could get lost. I was hoping there was a mod tool or admin cp section that you could use to list all the soft deleted threads but I'm not seeing anything.

    thanks for this. will be looking at it more
     
  20. DRE

    DRE Well-Known Member

    smh
     
    zaiger likes this.

Share This Page