<?php
function contains($substring, $string) {
$pos = strpos($string, $substring);
return $pos !== false;
}
if (!contains($post_message, "[youtube]http://www.youtube.com/watch?v="))
$post_message = str_replace("[youtube]", "[youtube]http://www.youtube.com/watch?v=", $post_message);
?>