CaptainChainsaw Posted August 22, 2008 Share Posted August 22, 2008 Hi all, I've set up a mysql table to store youtube links and the title of the movie. I've just written a script to view the movies but the movies aren't being displayed. When hovering over the area where the movie should be it says "movie not loaded". It might be something to do with the way I'm displaying the movies, but as I understand it, it should work. Here's my smarty template: <ol> {foreach key=id item=movie from=$results} <li><h4> {$movie.title} </h4><br /> <h5>{$movie.movielink} </h5> <object width="425" height="344"> <param name="movie" value="{$movie.movielink}&hl=en&fs=1"></param> <param name="allowFullScreen" value="true"></param> <embed src="{$movie.movielink}&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed> </object> </li> <br /><br /> {foreachelse} No items were found in the search {/foreach} </ol> As you can see I'm storing the url of the movie and placing it in the embedded object code. I've checked this object code and it's exactly the same as what's on youtube, any ideas why it wouldn't display the movie? Thanks again, CC Link to comment https://forums.phpfreaks.com/topic/120869-viewing-youtube-movies-with-links-stored-in-db/ Share on other sites More sharing options...
CaptainChainsaw Posted August 22, 2008 Author Share Posted August 22, 2008 I've sort of fixed this. I'm not totally happy with my fix but if I insert the entire url from the object code into the db it works fine: &hl=en&fs=1 I would've thought that I could just append the above to the url in the db: <param name="movie" value="{$movie.movielink}&hl=en&fs=1"></param> Why wouldn't my original code work? Thank you, CC Link to comment https://forums.phpfreaks.com/topic/120869-viewing-youtube-movies-with-links-stored-in-db/#findComment-623076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.