开发者

export phpbb forum post to blogger or some other blog

There is this forum. I want to to be able to select a certain forum post and convert it to a blogger post . Is this possible ? If so how do开发者_如何学运维 I get started ?

Thanks


This is certainly possible but no Mod currently exists for this so you would have to custom code to create a Mod in PHPBB from the Posting Page to push posts to Blogger. You can use the following function of the Blogger PHP API to create a Blogger Post:

function createPublishedPost($title='Hello, world!', $content='I am blogging on the internet.')
{
  $uri = 'http://www.blogger.com/feeds/' . $blogID . '/posts/default';
  $entry = $gdClient->newEntry();
  $entry->title = $gdClient->newTitle($title);
  $entry->content = $gdClient->newContent($content);
  $entry->content->setType('text');

  $createdPost = $gdClient->insertEntry($entry, $uri);
  $idText = split('-', $createdPost->id->text);
  $newPostID = $idText[2]; 

  return $newPostID; 
}

More information about the Blogger API can be found here:

http://code.google.com/apis/blogger/docs/1.0/developers_guide_php.html

If you don't have the necessary skills to create a PHPBB Mod you can request a Mod by posting a request on the following PHPBB Forum:

http://www.phpbb.com/community/viewforum.php?f=72

Pete

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜