Disabling direct access to images using .htaccess

I have added the following rewrite rule to my .htaccess (above the previous rewrite rule): RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L] You presumably have another .htaccess file in the /wp subdirectory that contains the main WordPress directives (ie. # BEGIN WordPress etc.). You should be adding the above rule to the /wp/.htaccess file, not the one in … Read more

WordPress bug with capabilities?

Activate the plugin again, reset your caps to default. I guess the problem is the plugin – not wp. Maybe it misses to add some capability. Best would be to try to take a look at the capabilites that are assigned to the different roles. How-to inspect current user data the smart way Create an … Read more

Interface for logged-in users to upload/download files

You can have a look on the following plugin for this purpose: WordPress Download Monitor I have found this plugin very useful for uploading/downloading files. This plugin will store files in the web server. This has also built in Download Page function with built in sorting, pagination, search feature and many more.

Post processing of uploaded file

You can do this using the wp_handle_upload hook: http://adambrown.info/p/wp_hooks/hook/wp_handle_upload?version=3.4&file=wp-admin/includes/file.php Create a function and add it to this hook so it runs last, it will be passed an array. The array contains the location of the newly uploaded file: add_filter(‘wp_handle_upload’,’wpse_66775_handle_upload’,1000,1); function wpse_66775_handle_upload($args){ $filename = $args[‘file’]; $type = $args[‘type’]; // test if it’s an XML file and … Read more

PDF file upload issue

You should set your MIME types for your pdf. ‘application/pdf’ and/or ‘application/x-pdf’ sorry for the quick answer, no time to go into detail but this should get you on the way

update_options and unique filenames

Welcome to the lions den So you’re willing to get down into the blazing furnace or the lions den and change the upload path. This is so not a good idea without investigating what is happening behind the scenes. I can’t give you a full write up, as there’s so much involved, like filters, options … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)