Jump to content

IP.Downloads File Merger


Recommended Posts


File Name: IP.Downloads File Merger

File Submitter: sijad

File Submitted: 09 Apr 2012

File Category: Performance

Supported Versions: IP.Downloads 2.4.x, IP.Downloads 2.5.x

Allows you to merge 2 IP.Downloads files together. Offers group settings to only allow selected members the ability to perform this action. Merging the files should take all of the data related to one file and move it into the record of another file. So all things like the actual file people can download, screenshots, comments, likes, ratings, revisions, etc., will be taken from one file and be added into the other. The support topics should be merged, and any paid file info should be updated (those who bought either file will be showing as having bought the resulting merged file, the payment terms of the 'parent' file will be the ones retained).

Please be advised that there is NO UNDO for this operation, so access to perform this should be given out carefully, and should any mistakes occur the only way to undo the changes is to restore a backup of the altered data. Also please note that after a merge occurs, you will still likely want to edit the resulting file to properly clean up things like which files and screenshots to retain, custom fields, and saved revisions to keep.

here to download this file

Link to comment
Share on other sites

I'd just like to stress that you need to be very careful when using this hook. It's very cool, and can do some really nifty stuff, if merging files is actually what you need to do, but you can also do damage to your downloads if you're not careful. Consider the mess you might get in if you accidentally merged two topics on your forums together which shouldn't have been merged, and now need put back into the separate topics again. That's the sort of thing you may run into with this hook. If you want to use this, I'd advise you try it on a copy of your main site first, just verify everything merges properly.

Link to comment
Share on other sites

This is a feature I would definitely need for my type of site. One question, after merging the files, does it automatically remove/delete the previous 2 listings?

It deletes the one you merge into the other. How it works is this: you go to an existing file, you click a link up by the file author's name and it pops up a box asking you for the ID# of the file to merge into the file you're in. Everything about that one whose ID you type in (which I refer to as the child file) gets either copied over to apply to the file whose page you're on (the parent file), or it gets deleted if it's not applicable anymore. At the end of the merge, the parent file will be left, and the child file will be gone.

For example, any who Liked the child file and who didn't yet Like the parent file will now like the merged parent file. Any comments made on the child file will now show up on the parent file. Any screenshots from the child will now be associated with the parent. But things like custom field data can't be merged, so the parent's info is kept and the child's info is deleted.

Does this make sense?
Link to comment
Share on other sites

It should, although to be honest I have not tested that. I would recommend testing it out on some test files to be sure. But a lot of the code was taken from the code that executes when you delete a file, it was just adapted to reassign things that would have gotten deleted before, so it should work.

Link to comment
Share on other sites

  • 2 weeks later...


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...