View Single Post
Old 07-30-2010, 04:38 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,378
Auto-updating TubePress Blog

Today I'll explain how to use CyberSEO Suite and TubePress Theme to build a full-featured auto-updating tube site.

CyberSEO Suite + TubePress = Auto-updating Tube Site

Today I'll show you how to use the TubePress theme with CyberSEO Suite.

As the manual says, the TubePress theme makes our blog look like a tube site. However we have one small problem there. All these tube-like posts must be composed and published manually which is absolutely unacceptable because we want to have an auto updating tube site which will be able to parse at least standard XML FLV feeds in Smart Tube format. This is why we need CyberSEO Suite with its unlimited abilities to parse custom XML tags, create custom WP post fields and pre-process the aggregating posts.

So, let's take some XML feed, e.g.: http://hostave4.net/rp/hfv/xml_feed_62.xml and syndicate it with CyberSEO Suite. Set up the necessary parameters on the "RSS Feed Syndicator" page, such as post categories, post tags, update frequency, set "Use syndication date" in the "Base date" field etc.

Now we have to follow the instruction of TubePress theme about custom fields. Thus we have to put the following text into the "Custom Fields" box:

Code:
screen_url::screen_url
screen::screen
clip_url::clip_url
flv::flv
Each left argument is the name of XML tag and the right one is the name of custom field of WP post where the contents of mentioned tag must go to.

As far as we know, the FLX XML files of Smart Tube format have no link to paysite and even have no FLV code which is required by TubePress theme. So we need to write a special PHP code which will fix all the mentioned problems in aggregating posts. Move to the "PHP Code <?php .. ?>" field and put the following PHP code there:

PHP Code:
// put the affiliate link to paysite into the 'sponsor link' custom field according to TubePress doc
$post ['custom_fields'] ['sponsor link'] = 'http://www.ropeporn.com/index.html?id=XXX';
// 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'];
// put the post description into the 'descrip' custom field according to TubePress doc 
$post ['custom_fields'] ['descrip'] = $post ['post_excerpt'];
// 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 ['post_excerpt'] = '<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="600" height="480"> 
<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'] ['sponsor link'] ) . '" /> <object type="application/x-shockwave-flash" data="/flvplayer.swf" width="600" height="480"> 
<param name="movie" value="' 
$post ['guid'] . '" /> 
<param name="link" value="' 
urlencode $post ['custom_fields'] ['sponsor link'] ) . '" /> 
<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'] ['sponsor link'] ) . '" /> <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p> 
</object> 
</object><br />' 
$post ['post_excerpt'] . "</p>";
// 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'] ); 

Now save the feed options and relax while the CyberSEO Suite syndicates the given XML file and updates our tube blog with synonymized content automatically. Fire and forget!


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