How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Brandon M. Your Own Question

Brandon M.
Brandon M., Web Designer
Category: Programming
Satisfied Customers: 6976
Experience:  Web Design for 10 years, HTML, XML, PHP/MySQL, Perl, JavaScript, CSS
12024030
Type Your Programming Question Here...
Brandon M. is online now
A new question is answered every 9 seconds

Ive embedded hundreds of sound files as "link to media file"

Resolved Question:

I've embedded hundreds of sound files as "link to media file" and I play them with a plugin player called Haiku. It's lovely, but the cross platform and browser support isn't so wonderful. I'd like to change all our sound files to reference the native media support from wordpress, by changing all of the "link to media file" links to be "link to media player" links- which would bypass the plugin (which I could disable) and allow for native wordpress media support. An example of the two players can be found here: http://www.dialectsarchive.com/wp-admin/post.php?post=14854&action=edit

Do you know of a plugin or method to alter this across an entire site?
Submitted: 1 year ago.
Category: Programming
Expert:  Brandon M. replied 1 year ago.

Brandon M. :

Hello and thank you for contacting us, a paid expert support site. My name is XXXXX XXXXX I'd be glad to assist you with your issue.

Brandon M. :

Sorry that link is protected as I would need an admin login to view. Is the difference between the two just a change in short code?

Customer:

yeah

Customer:

sorry, man

Customer:

that's protected?

Customer:

oh, sorry i sent you a link from the admin window

Brandon M. :

No worries. I am using Safari on a Mac and only see one player there

Brandon M. :

It's black in color

Brandon M. :

(I assume the Quicktime player)

Customer:

i just took out the old player

Customer:

that new player is the native media player

Brandon M. :

Ok, so yes, I see the native player.

Brandon M. :

So, if it is just a change in short code, it might be an easy fix directly through the database

Customer:

i believe it is just a change in short code, but across the entire site

Customer:

ok

Brandon M. :

Can you paste me a sample of both codes for the same file?

Customer:

yes

Customer:

from the "text"/code perspective it looks like

Customer:

[audio mp3="http://www.dialectsarchive.com/wp-content/uploads/2013/10/northcarolina21.mp3"][/audio]


<a href="http://www.dialectsarchive.com/wp-content/uploads/2013/10/northcarolina21.mp3">northcarolina21</a>

Customer:

the first being the native

Customer:

the second referencing the file as a link

Brandon M. :

Ok, so we are going from the second code to the first, correct?

Customer:

yes, sir

Brandon M. :

And I assume they are all MP3s?

Customer:

ummmm

Customer:

yes

Customer:

every single one

Brandon M. :

Great. Let me see what I can come up with - and do you have access to the database through your web panel or PHPMyAdmin?

Customer:

yep, cpanel to phpmyadmin

Customer:

i'm shocked there isn't a plugin to do this already

Brandon M. :

There might be but I am used to doing things directly. Programmer's mind, I guess... Haha

Customer:

cool, let me know

Brandon M. :

Ugh, can't use regex in MySQL Replace()

Brandon M. :

Would you be willing to give me a dump of your database or at least the table of posts and I can replace the strings using an external program?

Customer:

Sure

Customer:

gimme a minute

Brandon M. :

Great. Once you have it, please upload it to Wikisend: http://www.wikisend.com/ or your preferred file sharing site.

Brandon M. :

If you use wikisend, please provide the File ID so that I can download it.

Customer:

i might need a little help in this- I've never done it

Customer:

one sec

Brandon M. :

No worries - go to the posts table under the database on the left and use the Export tab on the right-side. You can then export the table - it will either give you a .sql file or a .gz file.

Customer:

ok

Customer:

i'm in finally

Customer:

looking at php my admin

Customer:

showing me three databases

Brandon M. :

Might be the second one, wrd1

Brandon M. :

Under it, do you have something like wp_posts listed?

Customer:

i think our primary databse is the first

Customer:

but i'll look

Customer:

i don't know why the f**k that wp_1 is there

Customer:

they both have posts options

Customer:

but wp_3 has all my plugins

Customer:

ahhhh

Customer:

_dialectsarchive has everything you need I think

Brandon M. :

Ok, whichever you think is the right one - depends on your setup, really.

Customer:

so quick export JUST the posts?

Brandon M. :

If you are entirely unsure, check your website via FTP or file manager from cpanel and look in the wp_config.php file

Customer:

wp_posts?

Customer:

just export wp_posts?

Brandon M. :

It will tell you what database it is using.

Brandon M. :

Yes, just wp_posts is fine

Customer:

sorry, it's doing the entire thing

Customer:

one sec

Brandon M. :

Its ok if you do the entire thing, I can just pull out wp_posts.

Brandon M. :

If you go to the wp_posts table first, you can export just that table

Customer:

getting wp_posts.sql now

Customer:

is that what you want?

Brandon M. :

Yup

Customer:

k

Customer:

i was going to use we transfer

Customer:

or whatever

Customer:

do you have an email

Customer:

or tell me how you'd like to upload

Customer:

nevermind

Customer:

i'm doing wikisend like you asked

Customer:

ummm too big i guess?

Customer:

email so i can use wetransfer?

Brandon M. :

I don't have a public email address, sorry.

Brandon M. :

Wikisend supports up to 100 MB.

Customer:

well the file won't upload there

Brandon M. :

How big is the file?

Customer:

one sec i'll check

Customer:

only

Customer:

45.1

Customer:

i'll try a couple more times

Customer:

We are sorry, but an error has occured while uploading.


You can return to the start page and try again.

Customer:

weird

Customer:

throw me an alternate place to do this please

Customer:

zippy share it is

Customer:

http://www12.zippyshare.com/v/12085532/file.html

Customer:

there we go :)

Brandon M. :

Ok, give me a little bit to do the replacements.

Customer:

cool

Brandon M. :

Ok, sorry that took so long.

Brandon M. :

Here is the updated file. 6207 replacements! https://www.dropbox.com/s/muchv0e93rqhib8/wp_posts-updated.sql

Brandon M. :

What you'll want to do is go into the wp-posts table in phpmyadmin, in the import tab, you can upload the file back in. (hopefully your host allows large files to be uploaded!)

Brandon M. :

It will drop the old table and replace it with the updated table.

Customer:

ok

Customer:

ummm, let me put up some notice and do that

Customer:

so, this won't mess up anything else, yeah?

Customer:

:)

Brandon M. :

Nope and if it does, you have the backup of the old posts table.

Brandon M. :

Sorry for the delay, I didn't see your reply.

Customer:

ok...

Customer:

so i think this is working

Customer:

i'm taking off our site warning and letting a few people test it

Customer:

and then i'll be paying you in a hot second

Brandon M. :

Okies, take your time

Brandon M. :

Just checking in - I'm going to need to step out soon. Just wanted to see how things were going. Not trying to rush or anything.

Brandon M. :

I will be back in a little bit.

Customer:

New is in. Working. Thanks! I'll pay now.

Brandon M., Web Designer
Category: Programming
Satisfied Customers: 6976
Experience: Web Design for 10 years, HTML, XML, PHP/MySQL, Perl, JavaScript, CSS
Brandon M. and other Programming Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >
  • http://ww2.justanswer.com/uploads/SP/spatlanta2010/2011-6-23_12450_photo.64x64.gif ATLPROG's Avatar

    ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Computer Software Engineer

    Satisfied Customers:

    5603
    Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
  • http://ww2.justanswer.com/uploads/unvadim/2010-11-15_210218_avatar.jpg unvadim's Avatar

    unvadim

    Computer Software Engineer

    Satisfied Customers:

    1158
    Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.
  • http://ww2.justanswer.com/uploads/lifesaver333/2010-10-17_191349_ls.jpeg lifesaver's Avatar

    lifesaver

    Computer Software Engineer

    Satisfied Customers:

    950
    Several years of intensive programming and application development experience in various platforms.
  • http://ww2.justanswer.com/uploads/EH/ehabtutor/2012-8-2_202016_1.64x64.jpg ehabtutor's Avatar

    ehabtutor

    Computer Software Engineer

    Satisfied Customers:

    864
    Bachelor of computer science, 5+ years experience in software development, software company owner
  • http://ww2.justanswer.com/uploads/RA/rajivsharma086/2012-6-6_17128_displaypic.64x64.jpg Raj's Avatar

    Raj

    Computer Engg.

    Satisfied Customers:

    860
    BE CS, 4+ Experience in Programming and Database (ERP)
  • http://ww2.justanswer.com/uploads/eljonis/2010-01-06_130406_eljon2.jpg Eljon's Avatar

    Eljon

    Consultant

    Satisfied Customers:

    590
    11 yrs of programming (PHP, WordPress, XSL, SQL, JavaScript)
 
 
 

Related Programming Questions

Chat Now With A Programmer
Brandon M.
Brandon M.
System Administrator
396 Satisfied Customers
Web Design for 10 years, HTML, XML, PHP/MySQL, Perl, JavaScript, CSS