JW Plugin "Tip Jar" integration???
I want to use the JW 'tipjar' plugin but I'm not sure what to put in the variables, especially in the config-donate.xml for the path to the video file. What I have doesn't work and I'm totally clueless (probably because I'm trying to do this on only 4 hours of sleep...D'oh!).I'm trying all kinds of things but nothing's working. It's probably something really easy and obvious but...I should stop now and go to bed!!! :roll:
Anyway...
This is my player.inc file where I added the so.addParam stuff according to the instructions:
Code:
<?php
$displayheight = $config['player_height'] - 20;
if($config['player_autostart'] == 1) {
$extra = "so.addVariable(\"autostart\", \"true\");";
} else {
$extra = "so.addVariable(\"autostart\", \"false\");";
}
$vshare_player = <<<EOT
<script type="text/javascript" src="{$config["baseurl"]}/player/swfobject.js"></script>
<p id="vshare_player">Get Flash to see this player.</p>
<script type="text/javascript">
var so = new SWFObject("{$config["baseurl"]}/player/player.swf","vshare_player","$config[player_width]","$config[player_height]","8");
so.addParam("allowfullscreen","true");
so.addParam('allowscriptaccess','always');
so.addParam('allownetworking','all');
so.addVariable('plugins', 'tipjar-1');
so.addVariable("file","{$file}");
so.addVariable("image","{$config["baseurl"]}/thumb/$video_id.jpg");
so.addVariable("logo","{$config["baseurl"]}/templates/images/watermark.gif");
so.addVariable("link","{$config["watermark_url"]}");
so.addVariable("linktarget","_blank");
so.addVariable("width","$config[player_width]");
so.addVariable("height","$config[player_height]");
so.addVariable("displayheight","$displayheight");
so.addVariable("overstretch", "true");
so.addVariable("skin", "{$config["baseurl"]}/player/skin.swf");
$extra
so.addVariable("bufferlength", "$config[player_bufferlength]");
so.write('vshare_player');
</script>
EOT;
This is the donate-config.xml
Code:
<config>
<file>{$video_info.VID}</file>
<plugins>donate.swf</plugins>
<donate.business>*******@hotmail.com</donate.business>
<donate.currency_code>USD</donate.currency_code>
<donate.title>Tip Jar</donate.title>
<donate.text>Buy me a Pepsi! Thanks.</donate.text>
<donate.show_pause>true</donate.show_pause>
<donate.show_complete>true</donate.show_complete>
</config>
I'm not sure what else it is that I'm supposed to be doing to get this to work. Anybody have any experience with this kind of thing? Their instructions is all for how to do this if you're just using the player out of the box, not with it on vShare, so I'm not sure what to do really...what goes in the <file></file> tags on the second line of the config thingie or if this is just for a single video that I'm embedding, in which case the path to the file would be easy(just tell it which video)...I'd like this to appear on all videos that have been uploaded.
Re: JW Plugin "Tip Jar" integration???
In order to use the JW plugins, you have to be using a 4.1+ player so if you are not using a 4.1+ player, it won't work. Secondly, I don't see anywhere in your player object code where you are calling your XML. There should be a parameter that calls the XML. Lastly, you will need to convert your XML to a PHP file so that it can be dynamically generated. The reason is because the code in the XML, by default, will not be parsed (via PHP or Smarty) because XML is client-side code and not server side code. Thus, all of the values must be present in the code before it is sent to the browser.
Re: JW Plugin "Tip Jar" integration???
Thanks so much.
I upgraded to 4.2 not too long ago.
There was nothing in their instructions about any of what you said about the xml to php. :S
Supposedly, just uploading the swf files that comes with it and putting the reference to the tipjar in the player.inc is supposed to use the plugin hosted at longtailvideo's servers. What I don't know how to to is 1) convert the xml to php and 2) what the path to the video file should be.
I found where I should have added this, however:
Code:
so.addParam("flashvars","config={$config["baseurl"]}/player/config/config-donate.xml");
I'm off to exhaust the Google Search engine about converting the xml to php. Wish me luck.
Oh P.S. I upgraded to the player 4.3
UPDATE: I played around with the path to the file and now I'm getting "This playlist is not a valid xml file." I've seen that post here in the forums before, I'll go review those, I think it's about the Agriya player.....