Creating a podcast directory site – how to allow user to upload “large” files?

Just to add to what other have said, beyond changing your php.ini settings, upload size is limited mainly by the browser/connection. There are more reliable browser bases solutions that use java/flash or a combination of tech that allow for uploads reliably up to 100MB. http://www.plupload.com/ http://www.swfupload.org/ http://www.uploadify.com/ http://jumploader.com/

Is there a function to list all uploaded images? How can I add one?

uploaded files are stored as attachment post type in WordPress. Use get_posts() and query for all attachments: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => null ); $all_attachments = get_posts( $args ); EDIT – you can also set post_mime_type in get_posts to get all of type ‘image/jpeg’ for example.

Best way to receive special images in posts

WordPress already does the heavy lifting for you on this. All you need to do is use post thumbnails. If you don’t see the featured image meta box on your pages/posts, place the following in your functions.php file. add_theme_support(‘post-thumbnails’); From there you will need to define a new image size in your functions.php file. add_image_size(‘special-image’, … Read more

Images don’t update after being edited

When you upload an image via the media library, additional sizes are created: large, medium, thumbnail, plus any additional sizes defined by plugins or your theme. If your theme displays any sizes other than the original, un-resized image, you’ll have to regenerate those additional sizes to see any changes take effect. If this is the … Read more

How to resize attachement

If you are trying to retroactively resize images, use the code you’ve supplied in your functions.php, then run the Regenerate Thumbnails plugin http://wordpress.org/extend/plugins/regenerate-thumbnails/ Once you’ve done that you should be able to display the image using the following: the_post_thumbnail(‘my_thumb’);

Uploading images in custom post form

Let’s presume your FILE variable is called ‘files’ and can contain multiple inputs (i.e. name=”files[]”) 1) First upload the files $uploads = wp_upload_dir(); $upload_file_url = array(); foreach ($_FILES[‘files’][‘name’] as $key => $value_data) { $errors_founds=””; if ($_FILES[‘files’][‘error’][$key] != UPLOAD_ERR_OK) $errors_founds .= ‘Error uploading the file!<br />’; if (!array_key_exists($_FILES[‘files’][‘type’][$key], $mime)) $errors_founds .= ‘Invalid file type!<br />’; if … Read more

adding a button to the media uploader

When i needed to do something similar i used the admin_print_scripts-media-upload-popup hook to add my own js/Jquery code to insert a button and handled it’s click event with ajax. something like this: add_action(‘admin_print_scripts-media-upload-popup’,’add_my_media_button’); function add_my_media_button(){ ?> <script> jQuery(document).ready(function() { //loop over all attachments jQuery(“.savesend”).each(function(i,v){ if (jQuery(this).next().attr(‘id’) != “”){ //get attachment id var att_id = jQuery(this).next().attr(‘id’); … Read more

Adding URL of PDF from Thickbox in a Meta Box

This line… imgurl = jQuery(‘img’,html).attr(‘src’); Means that jQuery is getting the “source” (i.e. full path) of the image. As you’ve guessed, that won’t work for a PDF file. What you’ll probably have to do is get the id of the attachment instead. Could you possibly update your original answer with the HTML SOURCE of the … Read more