• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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.
  • 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

#1
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
 

Kaiser

Well-known member
#2
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?
 
R

ragtek

Guest
#4
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
 
#12
Moved to Template Modifications (again).
Actually, it looks more like Code modification, not really a template one.

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
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.
 

Brogan

XenForo moderator
Staff member
#14
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.
 

Vincent

Well-known member
#15
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
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.
 
R

ragtek

Guest
#16
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.
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.
 

Vincent

Well-known member
#17
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.
Okay :(
 

Bain

Active member
#18
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.
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.
 

Mutt

Well-known member
#19
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