User:This, that and the other/For the Common Good/Reverse transfers

__INDEX__ It is possible to run For the Common Good in reverse – that is, to transfer files from Commons to a local wiki. Why would you want to do this? Perhaps a file is about to be deleted on Commons because it is not freely licensed, and you want to keep it on your local wiki as a "fair use" file. The local wiki in question doesn't even have to be a Wikimedia-hosted wiki. FtCG should be able to upload files to most wikis running a recent version of MediaWiki, so long as the MediaWiki API is accessible from a URL of the form. (If it doesn't work with your site, or if this URL pattern will not work for you, let me know and I'll try to make it work.) Reverse transfer functionality was added in FtCG version 1.0.5.11.

Setting up reverse transfers
Because FtCG was not designed with reverse transfers in mind, there are a few "tricks" to making this work. Things get a bit swapped around, so take care when changing the settings.  If you have FtCG open, close it. Open your "ForTheCommonGood.cfg" file (stored in the same folder as the FtCG executable) in a plain text editor, such as Notepad. At the bottom of the file, add the line ,		where xyz.wikiabc is the domain of the target wiki. (The ".org" is automatically added by FtCG.) Then save the file. Now open FtCG. If the "login" box appears, just click Cancel. Click the "Settings" button in the top-right corner. Set the following settings:  Target wiki (xyz.wikiabc) login details should hold your login details on the target wiki. Set the "Local wiki" field to  Local wiki login details should hold your Wikimedia Commons login details. Turn off the "I am an an admin on my local wiki" check box, regardless of any admin status you may hold.</li> <li>If the target wiki does not support HTTPS, turn off the "Use HTTPS" check box.</li> <li>In the Local wiki data section, load an appropriately customised local wiki data file. It's up to you to write this file!</li> </ul> </li> <li>You can now perform reverse transfers with FtCG, but you should turn off the "Tag local file with {{Now Commons}}" check box, as it may cause unintended effects. Also be extra-careful to check the generated wikitext on each file you transfer, as it may need significant changes.</li> </ol> To return to normal use of FtCG (transferring files to Commons), simply undo all the changes you made above.

Problems you may encounter
<dl> <dt>Duplicate  headers at the top of the generated wikitext</dt> <dd>Replace the  line in the local wiki data file with .		Don't forget to reload the local wiki data file after modifying it!</dd> <dt>Missing templates</dt> <dd>Make sure your local wiki contains the following templates (or, at least, redirects): <ul> <li>Template:Information (accepting at least the six parameters,  ,  ,  ,   and  )</li> <li>Template:Uv (a user link template – copy or import this one)</li> <li>Template:Original upload log (on Wikimedia wikis, this template should contain the exact code ; on non-Wikimedia wikis, it should just contain a translation of the text "Original upload log")</li> </ul> </dd> <dt>Dates in the original upload log are in English</dt> <dd>Although MediaWiki can localise dates internally, it does not provide a proper parser function/other means for pages to hook into this functionality. Therefore, we have to pick a language to hard-code into the page's wikitext. Since the lingua franca of Commons is English, FtCG uses English in dates. It's not feasible to work around this at the moment.</dd> </dl>

Transferring between two arbitrary wikis
You can even use FtCG to transfer files between any two wikis (e.g. to copy fair use files from one local wiki to another). The "local wiki" is always the source wiki, while the "CommonsDomain" setting in your ForTheCommonGood.cfg file will be the target wiki.

Need help or advice?
If you need help with this process, or have feedback, please don't hesitate to contact me.