Auto insert image into hyperlinks that link to mp3s

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jondperry
Forum Newbie
Posts: 1
Joined: Sat Jun 06, 2009 12:37 am

Auto insert image into hyperlinks that link to mp3s

Post by jondperry »

Im new to PHP and am beginning to mess with wordpressMU. I need someone to point me in the right direction.

In wordpress, users can link to mp3s. When they do this I would like a small music icon to appear automatically before the text in the hyperlink.

It would look something like this:

Image

<a href="link.mp3"><img src="http://auto-image.jpg" /> name of file</a>

The user would just create the link and the php would insert the image automatically.

I need a piece of code that would search the document for any links pointing to mp3s, then when it finds one it would insert the image.

I have no clue how to do this. Im a graphic artist who's way out of his league when messing with php. I'd be very happy with anyone who could at least give me a good clue.
Post Reply