*/ class TrackbackUtil extends Trackback { /** * Produces XML response for trackbackers with ok/error message. * * @param boolean $success * @param string $err_response * @return boolean */ public function receive($success = false, $err_response = ""){ return parent::recieve($cussess, $err_response); } /** * Sends a trackback ping to a specified trackback URL. * allowing clients to auto-discover the TrackBack Ping URL. * * @param string $tb * @param string $url * @param string $title * @param string $excerpt * @return boolean */ public function ping($tb, $url, $title = "", $excerpt = "") { $target = parse_url($tb); if(!array_key_exists('path', $target)) { $tb .= '/'; } @parent::ping($tb, $url, $title, $excerpt); } /** * @param postIDs * @return array */ public function getPost($postIDs) { if(!is_array($postIDs)) $postIDs = array($postIDs); // fetch thread data $sql = "SELECT thread.* FROM wbb".WBB_N."_post post LEFT JOIN wbb".WBB_N."_thread thread ON (thread.threadID=post.threadID) WHERE postID IN (".implode(',', $postIDs)."); "; $row = WCF::getDB()->getFirstRow($sql); // build thread url if($row && defined('SEO_ENABLED') && SEO_ENABLED && defined('SEO_REWRITE_THREAD') && SEO_REWRITE_THREAD && file_exists(WCF_DIR.'lib/page/PublicSEORewriter.class.php')) { require_once(WCF_DIR.'lib/page/PublicSEORewriter.class.php'); $rewriter = new PublicSEORewriter(); // public seo rewriter: cache $rewriter->publicCacheThreads($row['threadID'], $row); // public seo rewriter use $row['url'] = $rewriter->publicParseThreadURLs($row['threadID'], ''); } else if($row) { $row['url'] = sprintf('index.php?page=Thread&threadID=%d', $row['threadID']); } return $row; } } ?>