Some customers ask me on how to syndicate the non-standard video XML feeds (e.g. TnAflix, RedTube etc) with
CyberSEO for
AdultSiteSkins.
Here are two the instructions (perhaps you'll find them useful):
TnAflix XML + CyberSEO + AdultSiteSkins:
1) Syndicate the feed.
2) Find the "
Post thumbnail" option and select "
Generate from the "thumb" custom field".
3) Place the following line into the "Custom fields" box:
duration->duration
url->url
4) Put this code into the "PHP code <?php .. ?>" box:
PHP Code:
$post['guid'] = $post['custom_fields']['url'];
if (!cseo_post_exists($post)) {
preg_match('/\/video(.*?)\?/', $post['custom_fields']['url'], $matches);
$video_id = $matches[1];
$post['post_title'] = $post['post_excerpt'];
$post['post_content'] = '<iframe src="http://player.tnaflix.com/video/' . $video_id . '" width="750" height="564" frameborder="0"></iframe>' . '<p>' . trim($post['post_title']) . '.</p>';
$post['custom_fields']['duration'] = date('i:s', $post['custom_fields']['duration']);
$content = cseo_file_get_contents($post['custom_fields']['url']);
preg_match('/<meta property="og:image" content="(.*?)" \/>/', $content, $matches);
$post['custom_fields']['thumb'] = str_replace('.jpg', 'l.jpg', $matches[1]);
} else {
unset($post['custom_fields']['url']);
$post = false;
}
5) Save the settings and pull the feed.
RedTube XML + CyberSEO + AdultSiteSkins:
1) Syndicate the feed.
2) Find the "
Post thumbnail" option and select "
Generate from the first post image".
3) Place the following line into the "Custom fields" box:
summary->summary
4) Put this code into the "PHP code <?php .. ?>" box:
PHP Code:
if (!cseo_post_exists($post)) {
$embed = '<object height="564" width="750"><param name="allowfullscreen" value="true"><param name="AllowScriptAccess" value="always"><param name="movie" value="http://embed.redtube.com/player/"><param name="FlashVars" value="id=[ID]&style=redtube&autostart=false"><embed src="http://embed.redtube.com/player/?id=[ID]&style=redtube" allowfullscreen="true" AllowScriptAccess="always" flashvars="autostart=false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="564" width="750" /></object>';
preg_match('/"(.*?)".*?Duration: (.*?),/', $post['custom_fields']['summary'], $matches);
$post['post_excerpt'] = $post['post_content'];
$post['post_content'] = str_replace('[ID]', basename($post['guid']), $embed) . '<p>' . $matches[1] . '</p>';
$post['custom_fields']['duration'] = $matches[2];
unset($post['custom_fields']['summary']);
} else {
$post = false;
}
5) Save the settings and pull the feed.