Here is the instruction on how to run an autoupdating WordPress TGP site using free
Adult WordPress Theme and
CyberSEO.
1) Update your copy of the CyberSEO plugin to version 6.12 or higher (
VERY IMPORTANT!).
2) Syndicate a TGP feed (e.g.:
http://nats.ddfcash.com/ddfrss_22_1_...17_100_c_p.rss).
3) Find the "PHP code <?php .. ?>" box and paste there the following code:
Code:
if (!cseo_post_exists($post)) {
$max_images = 12;
$thumb_width = 180;
$thumb_height = 240;
$link = "http://www.google.com/";
if (function_exists('add_image_size')) {
add_image_size('thumbnail', $thumb_width, $thumb_height, true);
}
$gallery = cseo_file_get_contents($post['link']);
preg_match_all('/<a href="(.*?)".*?><img.*?src=".*?".*?>/is', html_entity_decode($gallery), $matches);
$cnt = 0;
foreach ($matches[1] as $line) {
if (stripos($line, ".jpg") !== false) {
if (stripos($line, "http://") !== false) {
$image = $line;
} elseif ($line[0] == "/") {
$image = "http://" . parse_url($post['link'], PHP_URL_HOST) . $line;
} else {
$image = str_replace(basename($post['link']), "", $post['link']) . $line;
}
cseo_add_image_to_library($image, $post['post_title']);
if (++$cnt == min(count($matches[1]), $max_images)) {
break;
}
}
}
$post['custom_fields']['thumb'] = $image;
$post['post_excerpt'] .= '<p>[gallery columns="4"]</p>';
$post['post_excerpt'] .= "<h2 align=\"center\"><a href=\"" . $link . "\" target=\"_blank\">Click Here For More!</a></h2>\n";
} else {
$post = false;
}
4) Make sure to alter the following variable values:
$max_images - the maximum gallery image count.
$thumb_width - gallery thumbnail width;
$thumb_height - gallery thumbnail height;
$link - your affiliate link to a paysite.
5) Save setting and enjoy your auto-updating TGP blog.
