Here is the fixed instruction for
TnAflix XML. The one above was written for some different custom feed. Sorry for the confusion.
1) Syndicate the feed.
2) Find the "
Post thumbnail" option and select "
Generate from the "thumb" custom field".
3) Put this code into the "PHP code <?php .. ?>" box:
PHP Code:
$post['guid'] = $post['link'];
if (!cseo_post_exists($post)) {
preg_match('/\/video(.*?)$/', $post['link'], $matches);
$video_id = $matches[1];
$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'] = '??:??';
$content = cseo_file_get_contents($post['link']);
preg_match('/<meta property="og:image" content="(.*?)" \/>/', $content, $matches);
$post['custom_fields']['thumb'] = str_replace('.jpg', 'l.jpg', $matches[1]);
} else {
$post = false;
}
4) Save the settings and pull the feed.