View Single Post
Old 08-30-2012, 04:28 PM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,384
:stop

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.
__________________
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