Hello I have been working on developing a custom forum software for personal use.
I have everything done accept for the youtube integratio the align and link features in the post.
As of right now Im more concerned with the youtube integration.
I am currently using js to add the button and tags to the post and php to implement what the tags do.
Currently the button is fine it posts the youtube tags which are [vid][/vid]
I am just having trouble figuring out how to assing a variable so that a user can input the video id.
I am trying to replace {PARAM} with the video id.
here is what I have on the php file.
;
$r = str_replace("[vid]","<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/{PARAM}'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{PARAM}' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>",$r);
$r = str_replace("[/vid]","",$r);
$r = str_replace("{PARAM}", "KcuJAe3TrQw",$r);
I have put a video id of KcuJAe3TrQw in quotes to see if the youtube will get put in if I just use the tags and it indeed does.
What I want to do is replace the id with a variable that I can let the user asign the id to...
How would I do this or something relevant that would work.
Also if you have any spare time I would love to know what I am doing wrong with the align
$r = str_replace("
[center]","align=center",$r);
$r = str_replace("[/center]
","'>",$r);
Thanx for looking at my post and I hope you can help me