Jump to content

Viewing youtube movies with links stored in db


CaptainChainsaw

Recommended Posts

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 :)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.