some patch to blog trackback code?
First, sorry for my poor english.
There are some blog implements don't have trackback ping define in blogs, so I want tiki can just take the url as trackback ping, instead of looking the trackback ping in the result.
And one of the implements don't return anything when a trackback ping successed.
So I'm do the following in 1.8 cvs code
lib/blogs/bloglib.php:117
preg_match("/trackback:ping=(\"|\'|\s*)(.+)(\"|\'\s)/", $data, $reqs);
if (!isset($reqs2))
$reqs2 = $track; // if there is no trackback info in page, take the url as tackback ping url
// return $ret;
@$fp = fopen($reqs2, 'r');
if ($fp) {
fclose ($fp);
$submit_url = $reqs2;
$submit_vars%22url%22 = $uri;
$submit_vars%22blog_name%22 = $blog_info'title';
$submit_vars%22url%22 = $uri;
$submit_vars%22blog_name%22 = $blog_info'title';
$submit_vars%22title%22 = $post_info'title' ? $post_info'title' : date("d/m/Y h:i", $post_info'created');
$submit_vars%22title%22 .= ' ' . tra('by'). ' ' . $post_info'user';
$submit_vars%22excerpt%22 = substr($post_info'data', 0, 200);
$snoopy->submit($submit_url, $submit_vars);
$back = $snoopy->results;
!strstr('<error>1</error>', $back)) { // take no result as good result |
$ret[] = $track; |
} |
The diff is : |
88a89 |
> |
117c118,119 |
< return $ret; |
--- |
> $reqs2 = $track; |
> // return $ret; |
133c135 |
< if (!strstr('<error>1</error>', $back)) { |
--- |
> if (!$back |
hope it helps