Go
Not registered? Sign up!

Viral Recommendations Help Please

Google Translate
13 posts | return to the Plugins forum | get the rss feed for this thread

Feb. 12, 2009Derek

I have the recommendations coming up fine with Viral, but I'm trying to get the videos to open up on a new page, the flv's are just playing in the same player now. Can anyone help me out please?

Thanks,
Derek

Feb. 12, 2009lefTy

Can you post your player code or a live link to your test page so we don't have to guess?

Feb. 20, 2009Derek

Sorry bout that, here's the code. Like I said they come up but play in the same window, i'm not a js guru more of a php guy so I'm sure I'm doing something wrong here..


<div name="mediaspace" id="mediaspace"></div>
<script type="text/javascript">


var so = new SWFObject('flvplayer1.swf','mpl','590','392','9');
so.addParam('allowscriptaccess','always');
so.addParam('allownetworking','all');
so.addParam('allowfullscreen','true');
so.addVariable('height','392');
so.addVariable('width','590');
so.addVariable('bufferlength','1');
so.addVariable('showstop','true');
so.addVariable('enablejs','true');
so.addParam("wmode","transparent");
so.addParam("windowless","true");
so.addVariable("channel", "3006");

so.addParam('flashvars','file=playlist.php?v=$vid_id&plugins=viral-1&viral.functions=link,recommendations&viral.onpause=false&viral.recommendations =recommend.php&skin=metarby10.swf&stretching=uniform&autostart=true&repeat=list');
so.write('mediaspace');

and here's the truncated recommend.php it's outputting a mrss file


<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel>
<link>MYURLSITENAME</link>
<item>
<title>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</title>
<link>"MYURL/play.php?vid=2257"</link>
<description>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</description>

<guid>"MYURL/play.php?vid=2257"</guid>

<media:content url = MYURL/uploads/LCIKd0lMmn2pnO5ehTan.flv" type="video/x-flv" />

<media:thumbnail url = "MYURL/uploads/thumbs/LCIKd0lMmn2pnO5ehTan.jpg" />
<media:player url="MYURL/play.php?vid=2257" />
</item>


</channel>
</rss>

Thanks,
Derek

Feb. 20, 2009lefTy

Is this an old v3.x player? Or did you just happen to rename it "flvplayer.swf" and leave all those v3.x flashvars in your code?

Feb. 20, 2009Derek

it's the newest one renamed, and yes I havent cleaned up the flashvars yet

Feb. 20, 2009lefTy

OK, I'll clean them up for you and add the code to stay on the same page.

Feb. 20, 2009Derek

Thanks man I truly appreciate it!

Derek

Feb. 20, 2009lefTy

OK, here's your HTML player page and a good recommendation XML file.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

  <head>

    <title>Derek - Viral - JWMP v4.4.x - swfobject v1.5</title>

    <script type="text/javascript" src="swfobject.js"></script>

  </head>

  <body>

    <div id="playercontainer" class="playercontainer"><a name="mediaspace" id="mediaspace" class="mediaspace" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this video.</a></div>

    <script type="text/javascript">
      var so = new SWFObject('player-4.4.162.swf', 'mpl', '590', '392', '9.0.124');
          so.addParam('allowscriptaccess',         'always');
          so.addParam('allowfullscreen',           'true');
        //so.addParam('allownetworking',           'all');
        //so.addParam('wmode',                     'transparent');
        //so.addParam('windowless',                'true');
          so.addVariable('file',                    encodeURIComponent('playlist.php?v=$vid_id'));
          so.addVariable('channel',                '3006');
          so.addVariable('bufferlength',           '1');
          so.addVariable('skin',                   'metarby10');
          so.addVariable('showstop',               'true');
          so.addVariable('stretching',             'uniform');
          so.addVariable('repeat',                 'list');
          so.addVariable('autostart',              'true');
        //so.addVariable('plugins',                'viral_1');                              // loaded from longtail
          so.addVariable('plugins',                'http://www.mydomain.com/path/viral_1'); // loaded from your server
          so.addVariable('viral.functions',        'link,recommendation');
          so.addVariable('viral.onpause',          'true');
          so.addVariable('viral.recommendations',  'recommend.php');
          so.write('mediaspace');
    </script>

  </body>

</html>


NOTE that this uses a v4.4.162 player from:

      http://developer.longtailvideo.com/trac/browser/trunk/as3

I don't think you need the Adobe Flash Player parameters: allownetworking, wmode, or windowless; but if you are absolutely sure that you need any of them, just uncomment them.

Your recommendation XML file should look like this.

<?xml version='1.0' encoding='UTF-8'?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <link>http://www.mydomain.com/</link>
    <item>
      <title>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</title>
      <link>http://www.mydomain.com/</link>
      <description>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</description>
      <media:group>
        <media:content   url="http://www.mydomain.com/video1.flv" type="video/x-flv" />
        <media:thumbnail url="http://www.mydomain.com/video1.jpg" />
      </media:group>
    </item>
    <item>
      <title>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</title>
      <link>http://www.mydomain.com/</link>
      <description>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</description>
      <media:group>
        <media:content   url="http://www.mydomain.com/video2.flv" type="video/x-flv" />
        <media:thumbnail url="http://www.mydomain.com/video2.jpg" />
      </media:group>
    </item>
    <item>
      <title>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</title>
      <link>http://www.mydomain.com/</link>
      <description>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</description>
      <media:group>
        <media:content   url="http://www.mydomain.com/video3.flv" type="video/x-flv" />
        <media:thumbnail url="http://www.mydomain.com/video3.jpg" />
      </media:group>
    </item>
    <item>
      <title>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</title>
      <link>http://www.mydomain.com/</link>
      <description>IPF Worlds 2008 Men 90kg Grade B Bench Press Part 2</description>
      <media:group>
        <media:content   url="http://www.mydomain.com/video4.flv" type="video/x-flv" />
        <media:thumbnail url="http://www.mydomain.com/video4.jpg" />
      </media:group>
    </item>
  </channel>
</rss>



Tested, running here:

     http://www.mydomain.com/Derek.html

          Enjoy!

Feb. 22, 2009Derek

Hey Lefty,

Thanks alot for the help. I'm still having the same issue though. The recommendations come up fine during/after the video, but when you click one, the flv just opens up in the same player, this causes the title and related videos etc area to be incorrect.

Anyway is there a way I contact you privately so I can give you the basics of the code and site?

Thanks,
Derek

Feb. 22, 2009lefTy

I can't find any way to get the viral plugin to open up a new window.

I think it's only programmed to load a new media file into the current player.

Perhaps the DRelated plugin would suffice if all you want is to have a click on the thumbnail open the player in a new window with the selected file.

      http://www.longtailvideo.com/addons/get-plugin.php?addon=54

I setup your player code with the DRelated plugin so you can see what it looks like.

Same demo link as I posted above.

You can contact me as username "wellitsme"

That's a gmail.com address.

Oct. 20, 2009Koreus

I have the same problem, I woud like that the video opens in a new window when I click on a recommendation.

Any solution ?

Oct. 28, 2009doug

i cant get the viral plugin to work. i used the auto script maker and it works fine from the page.
When i embed it on my site (yes i changed the file locations) it doesn't work.
the strange thing is, is that it used to work.

anyone able to help ?

Oct. 28, 2009Zachary Ozer

@ Koreus - Currently not possible to open recommendations in a new window. We'll email the author and ask them to add that feature.

@ doug - There's really no way to tell, especially if it's working on the testing page. Can you post a link to a page demonstrating the error?

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.