Urban Giraffe Support | Drain Hole
Versioning: how-to
Hi,
I have tried to use the versioning feature, but I have had no success.
I have tried to add a new branch, with "Keep previous" checked, and all the added versions are displayed correctly using the [drain file ID versions] code, but I can't have the download link to the previous version working. What do I have forgotten? Does this feature need a SVN? If so, how should I do (I have never used a SVN repository)?
Usually, I don't like to ask for help; I prefer to find my own way. But I can't find out!!!!
I'm looking for your answers impatiently.
Best Regards,
Sparad0x
Responses
Posted 3 months ago by Key Master
No you don't need to use SVN. Versioning should work without any additional effort - just check the 'keep previous version' and that version can then be downloaded. The URL should look something like:
/yourfile.zip?version=1.2
If you look inside the drain hole directory you should see a versions directory containing all the older versions.
Posted 3 months ago by Member
Hi John,
Thank you for both of your plugin and your quick answer.
I have had a look inside the drain hole directory: there is no "versions" directory. I have created one and chmoded it to 777, then tried to add a new version: I have had no results.
In fact, on the following capture (from your website), I only have the first field. The second field "Upload a file" doesn't exist. Is it a normal?
[img]http://urbangiraffe.com/images/plugin/drain-hole/add-file.png[/img]
So, theorically, to use versioning, I have first to edit the version checking "Keep previous version", and "Save". Then, using FTP, I have to erase the old version file with the new one. And that's all. Correct?
Doing so doesn't work for me. Any idea?
Best Regards,
Sparad0x
Posted 3 months ago by Key Master
Versions are very simple in Drain Hole and require no effort other than checking the 'keep previous version'. If Drain Hole does not allow you to upload a file then it is likely that your directory location is invalid and/or cannot be written to. This in turn could explain why versioning is not working.
Posted 3 months ago by Member
Hi again.
I have find the reason why I was unable to see the second field (and to upload files). I had to chmod the sub-folder too... *shame on me*
Now, a ".versions" folder is created when I check "Keep previous version", but that's all.
I have updated to v2.1.5, but nothing has changed.
Do you have any other idea?
If no, would there be a way to "manually" add version files (I don't know how the .versions folder' structure is, nor what has to be added to the database)? Of course, use the built-in versioning feature would be a real plus :-)
Best Regards,
Sparad0x
Note: I do not use a standard WP template.
P.S: if needed, I may create an admin account so that you may have a look.
Posted 3 months ago by Key Master
It sounds like your server environment is setup such that Drain Hole cannot assign any permissions itself. If you haven't already then you should also change the permissions on the versions directory.
It is possible to manually upload versionned files but there really is no need to do this. Versionning works as follows:
Posted 3 months ago by Member
I'm not able to have it working.
Here is my case:
On my server, in /httpdocs/Fichiers/VD/ (VD chmoded 777), I have a file: VirtualDub.exe (ch 644).
When I create a new DH, I set URL=/telecharger/VD and Directory=/var/www/vhosts/my-domain.org/httpdocs/Fichiers/VD/ , then "Create Drain Hole" button.
In the newly created DH, nothing appears, so I click on "Re-Scan" button. My file VirtualDub.exe appears with version number 0.1.
Then, I click on the version number to edit and replace it with the n-1 version number (1.6.9) thanks to the "Edit" option. Until then, everything is ok.
Then, I go back to "Drain Hole | Files for /telecharger/VD" and click on "+ new" branch button for my file. I set the new file version (1.8.5), check "Keep previous", and "Save".
Via FTP, I can see then a new empty ".versions" (ch 777) folder auto-created in /httpdocs/Fichiers/VD/.
But if I follow your instructions, overwriting VirtualDub.exe via FTP, then using the [drain file 47 versions] tag, only the latest version is available. The previous one is listed, but there is no link. And under the version number edit feature, I can read "No" in the "File" column for v 1.6.9.
I have tried to manually copy the 1.6.9 executable into ".versions" sub-directory, but nothing changes. Do I have to modify something manually in my database? Do you want some accesses to my DB and/or FTP?
Please... HELP!!!!!!!!!!!!
Regards,
Sparad0x
Posted 3 months ago by Member
About versioning, does it absolutly need to have the same file name?
i.e: current version filenamed VirtualDub_1.6.9.exe, updated version named VirtualDub_1.8.5.exe; may I replace the old one with the new one modifying the filename in DH? Or do I have to rename v1.6.9 to VirtualDub.exe, and to replace it with a same named file for versioning?
I'd like to know it in order to release the website, but preparing it in order to use versioning as soon as working.
Best Regards,
Sparad0x
Posted 2 months ago by Member
Up!
Could someone answer at least at my second question (post nb 7)?
Thanks in advance,
Sparad0x
Posted 2 months ago by Key Master
No you dont need to manually edit the database.
There is something on your server preventing the versionned file being created.
Versionned files are stored in .versions/file_FILEID_version_VERSIONID, where FILEID is the ID of the file and VERSIONID is the ID of the version (taken from the database, not what you give it).
Posted 2 months ago by Member
Thank you very much for your answer!!!!
Now, it works (manually, putting and renaming the old version into .versions folder).
I have found a small bug: if the version numbre contains some spaces (i.e: "1.8.5 build 29963"), the original file works, but the versionned one won't. I have solved it editing the file version from "1.8.5 build 29963" to "1.8.5".
[blockquote]There is something on your server preventing the versionned file being created.[/blockquote]
Could it be because of the "-" caracter in my domain name? Domain name is www.virtualdub-fr.org. I have no other wordpress blog installed on the same server. But if you think it could be a cause, I may put one on anotehr of my domains without "-" into the domain name.
Thanks again for your answer!
Now, I just have to update my pages, then to publish it and release the website!
Best Regards,
Sparad0x
Feature request: would it be possible to add an option in order to be able to "Enable anti-Leech" (default setting, same as current behaviour), "Disable anti-Leech" (it would allow to use SEO download URLs in order to count downloads, allowing other websites to direct link to the SEO download URLs), and "Redirect Leechers to Webpage" (with a field to indicate a webpage - i.e, to redirect Leechers to the Homepage, or to an other error page)?
Posted 2 months ago by Key Master
The 'stop hot links' option will prevent direct hot-linking to a download from an external website.
The plugin shouldn't care what characters are in your domain name. It's more likely to be a server configuration issue to do with the way PHP has been setup.
Reply
You must log in to post.