Ibrowser Problem for tinymce on WordPress

I using tinymce plugin (WYSI-Wordpress) as WYSIWYG editor for my blog, there is a very good image manager feature with this plugin, which allow you to create a very well format blog entry.

i start having some problem after my image folder growing too big, every time when i click on the Ibrowser ( the image manager for this plugin ) it takes so long to load it, due to it need to load all the image file in my image folder, after search on wordpress support and WYSI-Wordpress , it seem like no solution for this.

so no choice i have to do it myself, i was thinking list all the image is quite redundant, how about list the latest image which i upload ? so i was thinking do a time filter on it … woooooo it works and now the whole loading process is faster.

this is what i did

  • edit the Wysi-Wordpress/plugins/ibrowser/ibrowser.php
  • search for line 263 , if (is_file($root.$imglib.$entry) && in_array($ext,$tinyMCE_valid_imgs))
  • add  $thistime=time()-259200; before line 263
  • then change line 263 to  if (is_file($root.$imglib.$entry) && in_array($ext,$tinyMCE_valid_imgs) && filemtime($root.$imglib.$entry)>$thistime  )

you can put any value to replace 259200, one day is 86400 ( 24h*60m*60s). 259200 is for 3 day.

Share it with your friends, thanks !
Share on FacebookTweet about this on TwitterShare on Google+Share on TumblrBuffer this pagePin on PinterestEmail this to someone

You may also like...