captgoodvibes
Forum Replies Created
-
That did the trick perfectly, gourl.
Thanks once again. Your plug-in is perfect!Excuse my lack of knowledge, but do you mean change:
$tmp .= “<h1>”.htmlspecialchars($fileTitle, ENT_QUOTES).”</h1>”;
to this:
$tmp .= “<!– /*<h1>”.htmlspecialchars($fileTitle, ENT_QUOTES).”</h1>*/ –>”;
I don’t want to bust the program!Thank you for this answer, gourl.
Thanks for your reply, gourl.
The second question solution is a bit beyond my abilities. The files I have on my server are all in wp-content/uploads but reside in a different folder to the one that is linked to the “add new download” page.
I created a file in the folder “wp-content/uploads/gourl/files” and it recognizes that file. Is there somewhere in the code that commands the route as “wp-content/uploads/gourl/files” that can be edited to wp-content/uploads/my folder/files ?
If not I can copy all the files into your folder, but that would give me two copies of all the files on the server.Thanks for all your assistance Pippin.
I have made a donation to your site to show some appreciation!
I will mark this as resolved.Pippin, you have provided the solution!
The Forced method does work with the new beta version.
The files are completely protected by the htaccess command it creates.
Will the Forced method be able to handle large zipped files being downloaded, up to about 300MB?
I read in your documents that there may be a problem downloading larger files with the Forced method, or is this sorted out in your new beta version?Pippin, I had a bit of time just now so I gave it a try.
Sad to inform you the solution has failed.
Here is what I did:
1. Deactivated and Deleted EDD Plug-in.
2. Installed the EDD plug-in received from you yesterday. Activated it.
3. Went to Settings>Misc>Downloads and ticked the Symlink box.
4. Saved settings.
5. Attempted to access a file located here: https://mysite.com/wp-content/uploads/edd/2016/03/example.pdf
6. File was immediately downloaded.
7. Copied a file to https://mysite.com/wp-content/uploads/symlinks/ (Two files were created with this copy, one identical and another named: example_13347f2fbc4897815.pdf / (file is much smaller))
8. Attempted to access these files in symlinks folder through the browser.
9. Files were immediately downloaded.
10. Rechecked all settings – all okay.
11. Tried to “save” at Settings>Misc to see if had any effect. – None.
12. Uploaded “Pluginception Plug-in”
13. Created a blank Plug-in named “EDD file protector”.
14 Added this code into the blank plug-in:<?php function edd_custom_modify_htaccess_rules( $rules, $method ) { switch( $method ) : case 'redirect' : // Prevent directory browsing $rules = "Options -Indexes"; break; case 'direct' : default : // Prevent directory browsing and direct access to all files, except images (they must be allowed for featured images / thumbnails) $rules = "Options -Indexes\n"; $rules .= "deny from all\n"; $rules .= "<FilesMatch '\.(jpg|png|gif|ogg)$'>\n"; $rules .= "Order Allow,Deny\n"; $rules .= "Allow from all\n"; $rules .= "</FilesMatch>\n"; break; endswitch; return $rules; } add_filter( 'edd_protected_directory_htaccess_rules', 'edd_custom_modify_htaccess_rules', 10, 2 ); /* Plugin Name: EDD file protector Plugin URI: Description: Version: Author: Author URI: License: License URI: */
15. Tested access to all files named above. Instant download of all files was allowed.
Just to note, nothing is added to the htaccess file located in the EDD folder. It only reads as: Options -Indexes
Any suggestions Pippin?
Okay Pippin, you make it sound easy! I’ll give it a try over Easter and let you know how it works out.
Thanks for your replies!Pippin, just to be certain, do I uninstall EDD that I have now, then install this version that I just downloaded?
Also do I:
1. Place all my files I want protected into the file named “symlinks”. 2. Tick the box named “Symlink File Downloads?” located at Downloads>Settings>Misc? (save it)
3. I will have to make Media Library aware of the files being moved? (The download posts I created will no longer be able to locate the files, as the URL’s recorded in Media Library will change) I use the plug-in “Add from server” as most of my files are already on the server and are too large to upload through add media. This will mean reloading all files again, and finally removing the Media Library records that refer to the old file location.
All this will protect my files in the end, and do you think the plug-in will still work as it does now?Hi Pippin,
I’ll try anything to fix this problem! I am interested to try your version that fixes the Symlink files.
When I select the Forced download method the files cannot be accessed/stolen by entering the direct address into the browser, when the Forced setting is saved it sets that command in the htaccess file to prevent it.
However, all download links fail and any new links created also fail. The browser says the file cannot be found, it may have moved or have capitalization error. I just took it that my server probably does not support the Forced method.
Pippin, I am only a novice at this stuff but I have really tried to solve it by researching all your documents and forums. Please carefully explain any answers you have so that a novice like me can understand, please!!Forum: Fixing WordPress
In reply to: image – text – shortcode on the one lineOkay I removed the <Div align=”right”></div> command.
I inserted class=”alignright” inside of the shortcode. This places the link on the right, however the buttons properties of being blue with white writing are lost, and it appears as only blue writing.
Anyone know about all this stuff?Forum: Fixing WordPress
In reply to: image – text – shortcode on the one lineSorry that code should be:
<div align=”right”>[ purchase_link id=”XXX” style=”button” color=”blue” text=”Buy Now” ]</div>
I want the button on the right of the page, the text in the centre and the image on the left.