View Single Post
Old 05-19-2010, 03:59 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,350
Syndicating TubeX and Tube Ace XML Feeds

In one of my previous articles, I've already explained on how to syndicate the Smart Tube XML feeds. However as you may know, there is a slightly improved version of Smart Tube XML, which is used by TubeX and Tube Ace XML scripts. These feeds already contain the paysite URL with your affiliate code, so you don't need to enter it into the PHP code manually.

Let's take a look at this feed: http://www.christymarks.com/rss/flv_...Q5N y4wLjAuMA

As you can see, it has a tag called "<join_url>" which contain the link to a paysite - the value, which must be assigned to the "paysite_url" custom field. So we need just a bit change the contents of the "Custom Fields" box,a s shown below:

Code:
join_url::paysite_url
screen_url::screen_url 
screen::screen 
clip_url::clip_url 
flv::flv 
duration::duration
Now we also need to slightly change the "PHP Code <?php .. ?>" field and put the following PHP code there:

PHP Code:
// put site name into the "paysite_title" custom field according to Free WordPress Tube doc
$post ['custom_fields'] ['paysite_title'] = 'Christy Marks'// you will need to enter the appropriate site name here
// format clip's duration as mm:ss
$post ['custom_fields'] ['duration'] = date 'i:s'$post ['custom_fields'] ['duration'] ); 
// create an URL of thumb from it's path and filename
$post ['custom_fields'] ['thumb'] = $post ['custom_fields'] ['screen_url'] . $post ['custom_fields'] ['screen'];
// since FLV videos have no uniqui GUID's let's use their URL's as post GUID's  
$post ['guid'] = $post ['custom_fields'] ['clip_url'] . $post ['custom_fields'] ['flv'];
// now the most complex part. we have to create the FLV player code, assuming that our FLV player is stored as flvplayer.swf in the root dir of the blog
$post ['custom_fields'] ['video_code'] = '<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="700" height="544"> 
<param name="movie" value="/flvplayer.swf" /> 
<param name="allowfullscreen" value="true" /> 
<param name="allowscriptaccess" value="always" /> 
<param name="flashvars" value="image=' 
$post ['custom_fields'] ['thumb'] . '&file=' $post ['guid'] . '&autostart=false&linkfromdisplay=true&link=' urlencode $post ['custom_fields'] ['paysite_url'] ) . '" /> <object type="application/x-shockwave-flash" data="/flvplayer.swf" width="700" height="544"> 
<param name="movie" value="' 
$post ['guid'] . '" /> 
<param name="link" value="' 
urlencode $post ['custom_fields'] ['paysite_url'] ) . '" /> 
<param name="allowfullscreen" value="true" /> 
<param name="linkfromdisplay" value="true" /> 
<param name="allowscriptaccess" value="always" /> 
<param name="flashvars" value="image=' 
$post ['custom_fields'] ['thumb'] . '&file=' $post ['guid'] . '&autostart=false&linkfromdisplay=true&link=' urlencode $post ['custom_fields'] ['paysite_url'] ) . '" /> <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p> 
</object> 
</object>'
;
// now let's delete all useless custom fields 
unset ( $post ['custom_fields'] ['screen_url'] );
unset ( 
$post ['custom_fields'] ['screen'] );
unset ( 
$post ['custom_fields'] ['clip_url'] );
unset ( 
$post ['custom_fields'] ['flv'] ); 
Have a nice day
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote