Jump to content

Wordpress - Mass Post Edit


wblake37

Recommended Posts

Hi there, and thanks for clicking my thread

 

I have a problem I cant work out what the best way to resolve it because of my limited knowledge with php etc.

 

I basically want to mass edit all wordpress posts on my blog (6,801)

 

They are all youtube videos so they look kind of look like this:

 

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/watch?v=c5CcWoSzYj4?fs=1" /><param name="allowFullScreen" value="true" /> <embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/watch?v=c5CcWoSzYj4?fs=1&rel=0" allowfullscreen="true"></embed></object>

 

I want to pull that youtube url then replace it all with this code

 

<script type='text/javascript' src='jwplayer.js'></script>

 

<div id='mediaspace'>This text will be replaced</div>

 

<script type='text/javascript'>

  jwplayer('mediaspace').setup({

    'flashplayer': 'player.swf',

    'file': 'http://www.youtube.com/watch?v=c5CcWoSzYj4?fs=1',

    'controlbar': 'bottom',

    'width': '470',

    'height': '320'

  });

</script>

 

 

Would this be possible? I have basic php/html knowledge but from what i understand i need.

 

Some sort of script to read the url inside the <object> tag then replace it all with the new jwplayer code (looks so much better)

 

 

Thanks for reading, any thought towards this is much appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/242339-wordpress-mass-post-edit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.