Custom Search

Share |


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



#Permalink Tags: , , ,

Read Also:


Custom Search

16 Responses to “Insert Multiple Images Into a Post Published by Wordpress 2.6, 2.7”

  1. Iscar says:

    Waiting for you next article….

  2. Tips Photo says:

    These are great tips.

  3. shabooty says:

    couldnt get it to work in wp 2.7

  4. Yasser again,

    Make sure you change something in the right files:

    wp-admin/includes/media.php
    wp-admin/js/media-upload.js

  5. Hi, Yasser,

    I used the way above on my site (just upgraded to wp 2.6.5 yesterday) and it worked very well for several months already. Don’t worry, if you followed what the post told you to do, you’re supposed to be ok. But according to my own experience, you may have to wait for minitues to hours (even one day) before the script you changed functions properly.

    All the best,

  6. yasser says:

    Hello , i go back to wp 2.6 , and tried what you did , but still face the same problem , can you help me

  7. Yasser,

    Sorry for the problem you are encountering, before an official wp 2.7 was released, you are suggested to use wp 2.6

  8. Yasser says:

    hi , i tried this way but it didn’t work , im using wordpress 7 beta .
    i face a problem that i upload around 20 photo / post , and even the gallery function don’t work , i need to insert all the uploaded file once , can you help me ?

  9. Blog Picture says:

    Expert’s ideas. I appreciate this. Will try to apply the information provided herein and see the specific outcome in real situations. Many thanks.

  10. Hi Kilwag,

    The way above work well on two of my blogs using WP 2.6.3 and 2.6.2. Anyway, it’s good that you find another way. Congrats!

  11. kilwag says:

    I think this fix broke with 2.6.2 – I managed to get it to work by similarly editing the get_image_send_to_editor function on /wordpress/includes/media.php

    It’s a little slower than you’d think it would be, but still faster than loading the same swf uploader multiple times.

  12. matal videos says:

    thanks..

  13. admin says:

    Dear Reed,

    I’m a wordpress newbie, so sorry for not able to help you out. You can try to seek assistance from Wordpress.Org Help forum where many gurus would like to offer you a hand.

    All the best!

  14. Nicholas Reed says:

    hey, thats a really impressive solution. You must have done lots of searching through the code to find the spots that needed changing!

    I’d like to know if your interested in making more modifications to the media upload panel, like for example, once you have crunched all the images, you have to click the “show” button to maximize each images information and insert button – it would be great if all image info and insert buttons were maximized (so they are all visible) removing the need to click and be confused by the ’show’ button all the time.

    I am willing to pay for this solution. How much do you think you would charge for such a thing?

    Also, I will also be looking to modify the elements of the media upload panel using CSS, like hide all the unncessary image information like ‘image url’ and things like that. And remove various buttons and even whole tabs etc.

    Either way. thanks heaps, your solution really helps!

    Thank you!
    Nicholas Reed.

  15. free software says:

    this is good idea!thanks

Leave a Reply