Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.