Multiple File Uploaders on 1 Page WordPress plugin

jQuery(document).ready(function() { jQuery('#upload_image_button').click(function() { formfield = jQuery('#input1').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); jQuery('#upload_texture_button').click(function() { formfield = jQuery('#input2').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#'+formfield).val(imgurl); tb_remove(); } });...

0
0

How to Add Custom Fields to User Profile – WordPress

Super easy way to add custom fields to the user profile on Wordpress. This will take you 3 seconds to implement. function modify_contact_methods($profile_fields) { // Add new fields - this can be as many as you like $profile_fields['cool_new_field'] = 'Twitter Username'; // Remove old fields unset($profile_fields['some_existing_field_you_hate']); return $profile_fields; } add_filter('user_contactmethods', 'modify_contact_methods'); //And if you...

0
0

Best Survival Video Games of All Time

Survival Games are becoming more and more popular.  However, they have been around for quite a while. Here's some our all time favorites. We tried to post multiple reviews of each so everyone can get more than one opinion. If you have another game in...

0
0

Use WordPress Media Uploader in your Custom Plugin

This will make is Basicly what I did was adding this to my plugin: function test_admin_scripts() { wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_script('jquery'); } function test_admin_styles() { wp_enqueue_style('thickbox'); } add_action('admin_print_scripts', 'test_admin_scripts'); add_action('admin_print_styles', 'test_admin_styles'); And later this part: <script language="JavaScript"> jQuery(document).ready(function() { jQuery('#upload_image_button').click(function() { formfield = jQuery('#upload_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#upload_image').val(imgurl); tb_remove(); } }); </script> <tr valign="top"> <td>Upload Image</td> <td><label for="upload_image"> <input id="upload_image" type="text" size="36" name="upload_image" value="<?php echo $yourimage; ?>"...

0
0

Make Div Appear and Reappear with javascript

Make a div with the same id as the select input and you should be good to go. $(window).load(function(){ $(document).ready(function () { $('.group').hide(); $('#div1').fadeIn('slow'); $('#div1').change(function () { $('.group').hide(); $('#'+$(this).val()).fadeIn('slow'); }) }); }); ...

0
0