WordPress Bug on IIS ? Problem when uploading image on IIS 7

You are encountering an improperly configured server. Please consult the WordPress manual on how to setup wordpress on a windows server system. AFAIK – but I’m not a windows server expert – you must configure the upload directory that the user executing the PHP WordPress application is able to access files therein for reading, writing, … Read more

Why won’t this jQuery code work?

jQuery(‘a#add_media’).click(function() { input_code=”<p>” + ‘<input id=”upload_image-‘ + i + ‘” type=”text” size=”36″ name=”upload_image” value=”” />’ + ‘<input id=”upload_image_button-‘ + i + ‘” type=”button” value=”Upload Image” />’ + ‘</p>’; jQuery(input_code).appendTo(‘#upload_wrapper’); i++; }); jQuery(‘[id^=”upload_image_button”]’).click(function() { … }); Okay, here’s your basic problem. The first bit of the code adds a function to the click handler on the … Read more

WordPress Specified file failed upload test

You need to add the mime type to the whitelist of allowed file types. Assuming this one still works, you can go the plugin route using. http://wordpress.org/extend/plugins/pjw-mime-config/ Alternatively if you want to add your own mimes in code form, here’s an example. add_filter( ‘upload_mimes’, ‘your_custom_mimes’ ); function your_custom_mimes( $mimes ) { $mimes[‘extensionhere’] = ‘mimetype/goes-here’; return … Read more

Image resizing – TimThumb vs convert on upload?

WordPress and TimThumb both use GD to resize images, so quality is going to be similar. GD’s resize quality is not as good as Photoshop, you’ll notice this especially in fine details. Both WP and TimThumb can be modified to use ImageMagick, WP via a plugin, TimThumb I think requires you edit the code directly, … Read more

Change image name during uploading sequentially

The sequencing part will be handled automatically by wordpress. if you want to change the filename, you can do this : function k99_custom_upload_name($filename) { $info = pathinfo($filename); $ext = empty($info[‘extension’]) ? ” : ‘.’ . $info[‘extension’]; $filename=”put your name here”; return $filename; } add_filter(‘sanitize_file_name’, ‘k99_custom_upload_name’, 10); Because wordpress will handle the sequencing , your files … Read more

How can I manage and limit disk usage for each author?

Okey so this is just an example how you can archive this.. First change the upload directory to the current users username. eg uploads/admin function wpse_16722_type_upload_dir( $args ) { // Get current user data $current_user = wp_get_current_user(); // Make upload dir to current username $newdir=”https://wordpress.stackexchange.com/” . $current_user->user_login; $args[‘path’] = str_replace( $args[‘subdir’], ”, $args[‘path’] ); //remove … Read more

Large image upload size (using timthumb.php

Instead of using timthumb, use the internal image API. Firstly, specify the custom size you’re wanting to use by using add_image_size: Usage: <?php add_image_size( $name, $width, $height, $crop ); ?> So you would put this in your themes functions.php: add_image_size( ‘large_post_image_header’, 660,246,true); Then, instead of: <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); ?> … Read more