Custom Search

Posts on Hollywood Celebs' Gossips Tagged ‘Multiple Images Uploading’

Update: This manner is also applicable to Wordpress 2.7, I have tested.
***
When using the latest Wordpress 2.6+ software, one may encounter such an embarrassment—-each time the blogger can only insert a picture, after that, the media pop-up dialogue window closes.

So if you want to insert multiple images, say more than 5 at a time, into a single post, you have to repeat uploading again and again until the last one.

Someone may advise that the pictures be uploaded into the gallery first, then insert the gallery. But the problem here is that the pictures can not be freely arranged in the post.

Aren’t that frustrating? The answer is a definite yes! So this entry provides the ways to solve such problems by doing a bit of code modifications to let you simultaneously insert bulk batches of images then realign them. The concept is quite simple–keep the pop-up media dialogue window open each time after inserting a picture.

Following the steps below to do so,

  • Log in to the FTP client you use, (here take the FileZilla as example)
  • Open the “yoursite.com[or yoursite.com\blog]\wp-admin\includes” directory
  • Locate the file “media.php”, right click, in the drop-down menu, select “view and edit”
  • In the file automatically opened by Notepad, locate the section below in   “function media_send_to_editor($html)” tag
<?php
	exit;
}
  • Add double slashes “//“  right before exit, and “return;” right below one line of exit, so the code now looks:
function media_send_to_editor($html) {
	?>
<script type="text/javascript">
<!--
top.send_to_editor('<?php echo addslashes($html); ?>');
//top.tb_remove();
-->
</script>
	<?php
	//exit;
   return;
}
  • Save the file and in the FTP client, the file will be automatically updated. [to this point, those blogs using wordpress 2.5 already achieved the goal, but for wordpress2.6 or higher, keep do something listed below]
  • Return to the FTP client pannel and locate the wp-admin/js/ directory
  • Find media-upload.js file, this time you may need to download it onto the desktop, and right click the file, open it with Notepad (in the FTP panel,  using the way above to open media.php file, might not suit to open media-upload.js as the latter is a javascript file and might not automatically associate with Notepad)
  • Locate tb_remove(); you can easily find it by using the “Ctr+F” in Notepad
  • Add  double slashes “//” before tb, so the code now is //tb_remove();
  • Save the media-upload.js file
  • Upload it back to wp-admin/js/ directory, when prompt if you need to overwrite the existing file, click yes.
  • Wait for some minutes (or even hours) before the new script functions.
  • Hooray, you make it! Now you can bulk upload multiple image simultaneously inserted at a time while simply remain on the media pop-up dialogue window. After than you can freely rearrange your photos and wrap up texts around those you desire.

Source: How do u insert multiple images into a post?, On Wordpress 2.5 | Wordpress.org/Support