View Full Version : PHP Site using nvlab player (video)

18 Sep 2012, 05:31 AM
PHP Site using nvlab player (video)

Hi Everyone,

I have a site I didn't create that I've come to need to take care of... and I'm no PHP developer. The site is all PHP using Smarty Templates, and is basically a video site for business to show their videos. The main page of the site shows thumbnails you can click on, or search categories for videos.

The issue is that I was trying to add a video to the homepage (index) that will just show our content. I wasn't really sure how to do this, I'm sure there are many ways. I was trying to use the nvlab plugin that the rest of the site uses, but ran into trouble. When I view source on the "view video" page, the code shows a couple variables set... (so and nv)

<script type="text/javascript" src="http://businesstube.com/js/nuevoobject.js"></script>
<div name="placeholder" id="placeholder" style="width:640px;height:360px;position:relative;"></div>
<script type="text/javascript">var nv='http://businesstube.com/nvlab/player/player.swf?config=http://businesstube.com/nvlab/config.php?key=520b7e23956cf3548d63';
var so = new SWFObject(nv, "nuevoplayer", "640", "360", 9, "#000000");so.addParam("quality", "high");so.addParam("allowScriptAccess", "always");so.addParam("allowFullScreen", "true");so.addParam("flashvars",'skin=skins/white.swf'); so.write("placeholder");</script>

This is what the link to the video page looks like...

<div class="best-box-img">
<a href="http://businesstube.com/video/43720/acme-flood">
<img src="http://businesstube.com/thumb/1_43720.jpg" width="60" height="40" border="1" align="texttop"/>

<div id="best_of_the_best_info_division" style="padding-left:5px;">
<h4><a style="width: 190px;" href="http://businesstube.com/video/43720/acme-flood">acme flood</a></h4>
<div class="total_views">CALL 800-543-5905</div>

So basically I decided to copy the code from the view video page and just change the "key" (see above) to be the key of the video I want to play and put it in the correct template for the index page. The good news is the video plays and is formatted like I want it. The bad news, when you try to view any other video on the site, it plays the video I put on the home page. The view video page opens just fine, it just plays the wrong video no matter what you try to view. I'm thinking that maybe I need to reset the variable nv="" after the code where I call my video??

Any help or suggestions would be greatly appreciated. Thank you...

Fine Wine (http://www.sipplondon.com/Fine-Wines-%C2%A360-and-Over/c105/index.html)