Index: /trackback/en.xml
===================================================================
--- /trackback/en.xml (revision 1)
+++ /trackback/en.xml (revision 29)
@@ -3,19 +3,21 @@
 <language languagecode="en">
 	<category name="wcf.acp.group">
-		<item name="wcf.acp.group.option.user.board.canThank"><![CDATA[Can thank]]></item>
-		<item name="wcf.acp.group.option.user.board.canThank.description"><![CDATA[Members of this usergroup can thank other users for their posts.]]></item>
-		<item name="wcf.acp.group.option.user.board.canActivateThank"><![CDATA[Can activate thank'o'mat]]></item>
-		<item name="wcf.acp.group.option.user.board.canActivateThank.description"><![CDATA[Members of this usergroup can activate the thank'o'mat for posts.]]></item>
+		<item name="wcf.acp.group.option.user.board.canTrackback"><![CDATA[Can send trackbacks]]></item>
+		<item name="wcf.acp.group.option.user.board.canTrackback.description"><![CDATA[Members of this group can send trackbacks for an automated exhcange of messages and backlinks.]]></item>
 	</category>
 	
 	<category name="wbb.thread">
-		<item name="wbb.thread.post.button.thank"><![CDATA[Thank]]></item>
-		<item name="wbb.thread.post.thank.stats"><![CDATA[{if $postThanks[$messageID].users|isset}{@$postThanks[$messageID].users|count} registered user{if $postThanks[$messageID].users|count != 1}s{/if} {if $postThanks[$messageID].guests|isset}and {/if}{/if}{if $postThanks[$messageID].guests|isset}{@$postThanks[$messageID].guests} guest{if $postThanks[$messageID].guests != 1}s{/if} {/if}thanked already.]]></item>
-		<item name="wbb.thread.post.thank.users"><![CDATA[Users that thanked:]]></item>
+		<item name="wbb.thread.post.trackbacks"><![CDATA[Trackbacks]]></item>
+		<item name="wbb.thread.post.trackback.title"><![CDATA[Title]]></item>
+		<item name="wbb.thread.post.trackback.excerpt"><![CDATA[Excerpt]]></item>
+		<item name="wbb.thread.post.trackback.url"><![CDATA[URL]]></item>
+		<item name="wbb.thread.post.trackback.blog_name"><![CDATA[Blog]]></item>
 	</category>
 	
 	<category name="wbb.threadAdd">
-		<item name="wbb.threadAdd.settings.hastThank"><![CDATA[Activate thank'o'mat]]></item>
-		<item name="wbb.threadAdd.settings.hastThank.description"><![CDATA[Activate the thank'o'mat for this post.]]></item>
+		<item name="wbb.threadAdd.settings.hasTrackback"><![CDATA[activete trackbacks]]></item>
+		<item name="wbb.threadAdd.settings.hasTrackback.description"><![CDATA[]]></item>
+		<item name="wbb.threadAdd.settings.trackbackUrls"><![CDATA[send trackbacks to]]></item>
+		<item name="wbb.threadAdd.settings.trackbackUrls.description"><![CDATA[Please divide multiple urls with a linebreak.]]></item>
 	</category>
 </language>
Index: /trackback/files/lib/system/event/listener/ThreadAddFormTrackbackListener.class.php
===================================================================
--- /trackback/files/lib/system/event/listener/ThreadAddFormTrackbackListener.class.php (revision 1)
+++ /trackback/files/lib/system/event/listener/ThreadAddFormTrackbackListener.class.php (revision 29)
@@ -2,4 +2,7 @@
 // WCF include
 require_once(WCF_DIR.'lib/system/event/EventListener.class.php');
+
+// Utils
+require_once(WBB_DIR.'lib/util/TrackbackUtil.class.php');
 
 /**
@@ -8,8 +11,7 @@
  * @author	Torben Brodt
  * @package	de.easy-coding.wbb.trackback
+ * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 class ThreadAddFormTrackbackListener implements EventListener {
-	protected $rewriter; //public seo rewriter (optional)
-
 	protected $eventObj;
 	protected $className;
@@ -24,11 +26,5 @@
 	 * @see EventListener::execute()
 	 */
-	public function execute($eventObj, $className, $eventName) {
-		// init rewriter
-		if(((defined('SEO_REWRITE_BOARD') && SEO_REWRITE_BOARD) || (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');
-			$this->rewriter = new PublicSEORewriter();
-		}
-		
+	public function execute($eventObj, $className, $eventName) {		
 		$this->eventObj = $eventObj;
 		$this->className = $className;
@@ -75,7 +71,8 @@
          */
 	protected function assignVariables () {
-		WBBCore::getTPL()->assign('hasTrackback', $this->hasTrackback);
-		WBBCore::getTPL()->assign('trackbackUrls', $this->trackbackUrls);
-
+		WBBCore::getTPL()->assign(array(
+				'hasTrackback' => $this->hasTrackback,
+				'trackbackUrls', $this->trackbackUrls
+			));
 		WBBCore::getTPL()->append('additionalSettings', WBBCore::getTPL()->fetch('postTrackbackSetting'));
 	}
@@ -120,29 +117,12 @@
 	 */
 	private function readTrackbackData($postID) {
-		// 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 = {$postID}; ";
+		// fetch data
+		$row = TrackbackUtil::getPost($postID);
 
-                $result = WCF::getDB()->sendQuery($sql);
-                $row = WCF::getDB()->fetchArray($result));
-                
-                // basic data
-                $this->title = $row['topic'];
+		// assign basic data
+		$this->title = $row['topic'];
 		$this->excerpt = substr($row['firstPostPreview'],0,255);
 		$this->author = $row['username'];
-
-		// build thread url
-		if($this->rewriter === null) {
-			$this->url = sprintf('index.php?page=Thread&threadID=%d', $row['threadID']);
-		} else {
-                        // public seo rewriter: cache
-			$this->rewriter->publicCacheThreads($row['threadID'], $row);
-			
-			// public seo rewriter use
-			$this->url = $this->rewriter->publicParseThreadURLs($row['threadID'], '');
-		}
+		$this->url = $row['url'];
 	}
 	
@@ -152,7 +132,4 @@
 	private function discoverNewTrackbacks() {
 		$oldlist = explode(' ', $this->trackbackUrlsOld);
-	
-		// WCF includes
-		require_once(WCF_DIR.'lib/util/TrackbackUtil.class.php');
 		
 		// Trackback
Index: /trackback/files/lib/system/event/listener/ThreadPageTrackbackListener.class.php
===================================================================
--- /trackback/files/lib/system/event/listener/ThreadPageTrackbackListener.class.php (revision 1)
+++ /trackback/files/lib/system/event/listener/ThreadPageTrackbackListener.class.php (revision 29)
@@ -2,4 +2,7 @@
 // WCF includes
 require_once(WCF_DIR.'lib/system/event/EventListener.class.php');
+
+// Utils
+require_once(WBB_DIR.'lib/util/TrackbackUtil.class.php');
 
 /**
@@ -8,10 +11,7 @@
  * @author	Torben Brodt
  * @package	de.easy-coding.wbb.trackback
+ * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 class ThreadPageTrackbackListener implements EventListener {
-	protected $rewriter; //public seo rewriter (optional)
-	protected $trackbacks = array();
-
-	protected $url, $title, $excerpt, $author, $date;
 
 	/**
@@ -20,4 +20,5 @@
 	 */
 	public function execute($eventObj, $className, $eventName) {
+		$postTrackbacks = array();
 
 		// foreign trackbacks
@@ -28,44 +29,24 @@
 		$rows = WBBCore::getDB()->sendQuery($sql);
 		while ($row = WBBCore::getDB()->fetchArray($rows)) {
-			$this->trackbacks[$row['postID']]['trackback'] = $row;
-		}
-
-		// 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 (".$eventObj->postList->postIDs."); ";
-
-                $result = WCF::getDB()->sendQuery($sql);
-                $row = WCF::getDB()->fetchArray($result));
-                
-                // basic data
-                $this->title = $row['topic'];
-		$this->excerpt = substr($row['firstPostPreview'],0,255);
-		$this->author = $row['username'];
-		$this->date = date("r", $row['time']);
-		$this->trackbackUrl = sprintf('index.php?action=Trackback&threadID=%d', $row['threadID']);
-
-		// build thread url
-		if($this->rewriter === null) {
-			$this->url = sprintf('index.php?page=Thread&threadID=%d', $row['threadID']);
-		} else {
-                        // public seo rewriter: cache
-			$this->rewriter->publicCacheThreads($row['threadID'], $row);
-			
-			// public seo rewriter use
-			$this->url = $this->rewriter->publicParseThreadURLs($row['threadID'], '');
+			$postTrackbacks[$row['postID']] = $row;
 		}
 		
-		// WCF includes
-		require_once(WCF_DIR.'lib/util/TrackbackUtil.class.php');
+		// fetch data
+		$row = TrackbackUtil::getPost($eventObj->postList->postIDs);
+
+		// assign basic data
+		$title = $row['topic'];
+		$excerpt = StringUtil::substring($row['firstPostPreview'],0,255);
+		$author = $row['username'];
+		$date = date("r", $row['time']);
+		$trackbackUrl = sprintf('index.php?action=Trackback&threadID=%d', $row['threadID']);
+		$url = $row['url'];
 
 		// Trackback
 		$trackback = new TrackbackUtil(PAGE_TITLE, $this->author, CHARSET);
-		$rdf = $trackback->rdf_autodiscover($this->date, $this->title, $this->excerpt, $this->url, $this->trackbackUrl, $this->author);
+		$rdf = $trackback->rdf_autodiscover($date, $title, $excerpt, $url, $trackbackUrl, $author);
 
 		WBBCore::getTPL()->assign(array(
-			'trackbacks' => $this->trackbacks,
+			'postTrackbacks' => $postTrackbacks,
 			'autodiscover'=> $rdf
 		));
Index: /trackback/files/lib/system/cronjob/TrackbackCheckCronjob.class.php
===================================================================
--- /trackback/files/lib/system/cronjob/TrackbackCheckCronjob.class.php (revision 1)
+++ /trackback/files/lib/system/cronjob/TrackbackCheckCronjob.class.php (revision 29)
@@ -1,3 +1,4 @@
 <?php
+// WCF include
 require_once(WCF_DIR.'lib/data/cronjobs/Cronjob.class.php');
 
@@ -7,4 +8,5 @@
  * @author	Torben Brodt
  * @package	de.easy-coding.wcf.trackback
+ * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 class TrackbackCheckCronjob implements Cronjob {
@@ -64,5 +66,5 @@
 			}
 			
-			$sql_update = "UPDATE	wcf".WCF_N."_trackback
+			$sql = "UPDATE	wcf".WCF_N."_trackback
 				SET 
 						checked = NOW()
@@ -71,5 +73,5 @@
 				AND 		url = {$row[url]}; ";
 
-			WCF::getDB()->sendQuery($sql_update);
+			WCF::getDB()->sendQuery($sql);
 		}
 	}
Index: /trackback/files/lib/action/TrackbackAction.class.php
===================================================================
--- /trackback/files/lib/action/TrackbackAction.class.php (revision 1)
+++ /trackback/files/lib/action/TrackbackAction.class.php (revision 29)
@@ -6,4 +6,7 @@
 require_once(WBB_DIR.'lib/data/thread/Thread.class.php');
 
+// Trackback Util
+require_once(WBB_DIR.'lib/util/TrackbackUtil.class.php');
+
 /**
  * adds new trackback
@@ -11,4 +14,5 @@
  * @author	Torben Brodt
  * @package	de.easy-coding.wbb.trackback
+ * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 class TrackbackAction extends AbstractAction {
@@ -81,4 +85,7 @@
 			throw new IllegalLinkException();
 		}
+		
+		// fetch url data
+		$row = TrackbackUtil::getPost($this->postID);
 
 		// check for spam		
@@ -89,4 +96,5 @@
 			(
 					postID, 
+					postURL,
 					title,
 					excerpt, 
@@ -96,9 +104,10 @@
 			) VALUES (
 					{$this->postID}, 
-					{$this->title},
-					{$this->excerpt},
-					{$this->url},
-					{$this->blog_name},
-					{$isSpam}
+					'".escapeString($row['url'])."',
+					'".escapeString($this->title)."',
+					'".escapeString($this->excerpt)."',
+					'".escapeString($this->url)."',
+					'".escapeString($this->blog_name)."',
+					$isSpam}
 			);";
 
Index: /trackback/files/lib/util/Trackback.class.php
===================================================================
--- /trackback/files/lib/util/Trackback.class.php (revision 29)
+++ /trackback/files/lib/util/Trackback.class.php (revision 29)
@@ -0,0 +1,437 @@
+<?php
+
+/**
+ * PHP Class to handle TrackBacks (send/ping, receive, retreive, detect, seed, etc...)
+ * 
+ * <code><?php
+ * include('trackback_cls.php');
+ * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+ * ?></code>
+ * 
+ * ==============================================================================
+ * 
+ * @version $Id: trackback_cls.php,v 1.2 2004/12/11 18:54:32 Ran Exp $
+ * @copyright Copyright (c) 2004 Ran Aroussi (http://www.blogish.org)
+ * @author Ran Aroussi <ran@blogish.org> 
+ * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
+ * 
+ * ==============================================================================
+ */
+
+/**
+ * Trackback - The main class
+ * 
+ * @param string $blog_name 
+ * @param string $author 
+ * @param string $encoding 
+ */
+class Trackback {
+    var $blog_name = ''; // Default blog name used throughout the class (ie. BLOGish)
+    var $author = ''; // Default author name used throughout the class (ie. Ran Aroussi)
+    var $encoding = ''; // Default encoding used throughout the class (ie. UTF-8)
+    var $get_id = ''; // Retreives and holds $_GET['id'] (if not empty)
+    var $post_id = ''; // Retreives and holds $_POST['id'] (if not empty)
+    var $url = ''; // Retreives and holds $_POST['url'] (if not empty)
+    var $title = ''; // Retreives and holds $_POST['title'] (if not empty)
+    var $expert = ''; // Retreives and holds $_POST['expert'] (if not empty)
+    /**
+     * Class Constructure
+     * 
+     * @param string $blog_name 
+     * @param string $author 
+     * @param string $encoding 
+     * @return 
+     */
+    function Trackback($blog_name, $author, $encoding = "UTF-8")
+    {
+        $this->blog_name = $blog_name;
+        $this->author = $author;
+        $this->encoding = $encoding; 
+		
+        // Gather $_POST information
+        if (isset($_GET['id'])) {
+            $this->get_id = $HTTP_GET_VARS['id'];
+        } 
+        if (isset($_POST['id'])) {
+            $this->post_id = $HTTP_POST_VARS['id'];
+        } 
+        if (isset($_POST['url'])) {
+            $this->url = $HTTP_POST_VARS['url'];
+        } 
+        if (isset($_POST['title'])) {
+            $this->title = $HTTP_POST_VARS['url'];
+        } 
+        if (isset($_POST['expert'])) {
+            $this->expert = $HTTP_POST_VARS['expert'];
+        } 
+    } 
+
+    /**
+     * Sends a trackback ping to a specified trackback URL.
+     * allowing clients to auto-discover the TrackBack Ping URL. 
+     * 
+     * <code><?php
+     * include('trackback_cls.php');
+     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+     * if ($trackback->ping('http://tracked-blog.com', 'http://your-url.com', 'Your entry title')) {
+     * 	echo "Trackback sent successfully...";
+     * } else {
+     * 	echo "Error sending trackback....";
+     * }
+     * ?></code>
+     * 
+     * @param string $tb 
+     * @param string $url 
+     * @param string $title 
+     * @param string $excerpt 
+     * @return boolean 
+     */
+    function ping($tb, $url, $title = "", $excerpt = "")
+    {
+        $response = "";
+        $reason = ""; 
+        // Set default values
+        if (empty($title)) {
+            $title = "Trackbacking your entry...";
+        } 
+        if (empty($excerpt)) {
+            $excerpt = "I found your entry interesting do I've added a Trackback to it on my weblog :)";
+        } 
+        // Parse the target
+        $target = parse_url($tb);
+
+        if ((isset($target["query"])) && ($target["query"] != "")) {
+            $target["query"] = "?" . $target["query"];
+        } else {
+            $target["query"] = "";
+        } 
+
+        if ((isset($target["port"]) && !is_numeric($target["port"])) || (!isset($target["port"]))) {
+            $target["port"] = 80;
+        } 
+        // Open the socket
+        $tb_sock = fsockopen($target["host"], $target["port"]); 
+        // Something didn't work out, return
+        if (!is_resource($tb_sock)) {
+            return '$trackback->ping: can\'t connect to: ' . $tb . '.';
+            exit;
+        } 
+        // Put together the things we want to send
+        $tb_send = "url=" . rawurlencode($url) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($this->blog_name) . "&excerpt=" . rawurlencode($excerpt); 
+        // Send the trackback
+        fputs($tb_sock, "POST " . $target["path"] . $target["query"] . " HTTP/1.1\r\n");
+        fputs($tb_sock, "Host: " . $target["host"] . "\r\n");
+        fputs($tb_sock, "Content-type: application/x-www-form-urlencoded\r\n");
+        fputs($tb_sock, "Content-length: " . strlen($tb_send) . "\r\n");
+        fputs($tb_sock, "Connection: close\r\n\r\n");
+        fputs($tb_sock, $tb_send); 
+        // Gather result
+        while (!feof($tb_sock)) {
+            $response .= fgets($tb_sock, 128);
+        } 
+        // Close socket
+        fclose($tb_sock); 
+        // Did the trackback ping work
+        strpos($response, '<error>0</error>') ? $return = true : $return = false; 
+        // send result
+        return $return;
+    } 
+
+    /**
+     * Produces XML response for trackbackers with ok/error message.
+     * 
+     * <code><?php
+     * // Set page header to XML
+     * header('Content-Type: text/xml'); // MUST be the 1st line
+     * //
+	 * // Instantiate the class
+	 * //
+     * include('trackback_cls.php');
+     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+	 * //
+     * // Get trackback information
+	 * //
+     * $tb_id = $trackback->post_id; // The id of the item being trackbacked
+     * $tb_url = $trackback->url; // The URL from which we got the trackback
+     * $tb_title = $trackback->title; // Subject/title send by trackback
+     * $tb_expert = $trackback->expert; // Short text send by trackback
+	 * //  
+     * // Do whatever to log the trackback (save in DB, flatfile, etc...)
+	 * //
+     * if (TRACKBACK_LOGGED_SUCCESSFULLY) {
+     * 	// Logged successfully...
+     * 	echo $trackback->recieve(true);
+     * } else {
+     * 	// Something went wrong...
+     * 	echo $trackback->recieve(false, 'Explain why you return error');
+     * }
+     * ?></code>
+     * 
+     * @param boolean $success 
+     * @param string $err_response 
+     * @return boolean 
+     */
+    function recieve($success = false, $err_response = "")
+    { 
+        // Default error response in case of problems...
+        if (!$success && empty($err_response)) {
+            $err_response = "An error occured while tring to log your trackback...";
+        } 
+        // Start response to trackbacker...
+        $return = '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n";
+        $return .= "<response> \n"; 
+        // Send back response...
+        if ($success) {
+            // Trackback received successfully...
+            $return .= "	<error>0</error> \n";
+        } else {
+            // Something went wrong...
+            $return .= "	<error>1</error> \n";
+            $return .= "	<message>" . $this->xml_safe($err_response) . "</message>\n";
+        } 
+        // End response to trackbacker...
+        $return .= "</response>";
+
+        return $return;
+    } 
+
+    /**
+     * Feteched trackback information and produces an RSS-0.91 feed.
+     * 
+     * <code><?php
+     * // 1
+     * header('Content-Type: text/xml'); // MUST be the 1st line
+     * // 2
+     * include('trackback_cls.php');
+     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+     * // 3
+     * $tb_id = $trackback->get_id;
+     * // 4
+     * Do whatever to get trackback information by ID (search db, etc...)
+     * if (GOT_TRACKBACK_INFO) {
+     * 	// Successful - pass trackback info as array()...
+     * 	$tb_info = array('title' => string TRACKBACK_TITLE, 
+     * 			'expert'	=> string TRACKBACK_EXPERT,
+     * 			'permalink' => string PERMALINK_URL,
+     * 			'trackback' => string TRACKBACK_URL
+     * 		);
+     * 	echo $trackback->fetch(true, $tb_info);
+     * } else {
+     * 	// Something went wrong - tell my why...
+     * 	echo $trackback->fetch(false, string RESPONSE);
+     * }
+     * ?></code>
+     * 
+     * @param boolean $success 
+     * @param string $response 
+     * @return string XML response to the caller
+     */
+    function fetch($success = false, $response = "")
+    {
+        if (!$success && empty($response)) {
+            $response = "An error occured while tring to retreive trackback information...";
+        } 
+        // Start response to caller
+        $return = '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n";
+        $return .= "<response> \n"; 
+        // Send back response...
+        if ($success) {
+            // Trackback retreived successfully...
+            // Sending back an RSS (0.91) - trackback information from $response (array)...
+            $return .= "	<error>0</error> \n";
+            $return .= "	<rss version=\"0.91\"> \n";
+            $return .= "	<channel> \n";
+            $return .= "	  <title>" . $this->xml_safe($response['title']) . "</title> \n";
+            $return .= "	  <link>" . $this->xml_safe($response['trackback']) . "</link> \n";
+            $return .= "	  <description>" . $this->xml_safe($response['expert']) . "</description> \n";
+            $return .= "	  <item> \n";
+            $return .= "		<title>" . $this->xml_safe($response['title']) . "</title> \n";
+            $return .= "		<link>" . $this->xml_safe($response['permalink']) . "</link> \n";
+            $return .= "		<description>" . $this->xml_safe($response['expert']) . "</description> \n";
+            $return .= "	  </item> \n";
+            $return .= "	</channel> \n";
+            $return .= "	</rss> \n";
+        } else {
+            // Something went wrong - provide reason from $response (string)...
+            $return .= "	<error>1</error> \n";
+            $return .= "	<message>" . $this->xml_safe($response) . "</message>\n";
+        } 
+        // End response to trackbacker
+        $return .= "</response>";
+
+        return $return;
+    } 
+
+    /**
+     * Produces embedded RDF representing metadata about the entry,
+     * allowing clients to auto-discover the TrackBack Ping URL.
+     * 
+     * NOTE: DATE should be string in RFC822 Format - Use RFC822_from_datetime().
+     * 
+     * <code><?php
+     * include('trackback_cls.php');
+     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+     * 
+     * echo $trackback->rdf_autodiscover(string DATE, string TITLE, string EXPERT, string PERMALINK, string TRACKBACK [, string AUTHOR]);
+     * ?></code>
+     * 
+     * @param string $RFC822_date 
+     * @param string $title 
+     * @param string $expert 
+     * @param string $permalink 
+     * @param string $trackback 
+     * @param string $author 
+     * @return string 
+     */
+    function rdf_autodiscover($RFC822_date, $title, $expert, $permalink, $trackback, $author = "")
+    {
+        if (!$author) {
+            $author = $this->author;
+        } 
+
+        $return = "<!-- \n";
+        $return .= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" \n";
+        $return .= "	xmlns:dc=\"http://purl.org/dc/elements/1.1/\" \n";
+        $return .= "	xmlns:trackback=\"http://madskills.com/public/xml/rss/module/trackback/\"> \n";
+        $return .= "<rdf:Description \n";
+        $return .= "	rdf:about=\"" . $this->xml_safe($permalink) . "\" \n";
+        $return .= "	dc:identifier=\"" . $this->xml_safe($permalink) . "\" \n";
+        $return .= "	trackback:ping=\"" . $this->xml_safe($trackback) . "\" \n";
+        $return .= "	dc:title=\"" . $this->xml_safe($title) . "\" \n";
+        $return .= "	dc:subject=\"TrackBack\" \n";
+        $return .= "	dc:description=\"" . $this->xml_safe($this->cut_short($expert)) . "\" \n";
+        $return .= "	dc:creator=\"" . $this->xml_safe($author) . "\" \n";
+        $return .= "	dc:date=\"" . $RFC822_date . "\" /> \n";
+        $return .= "</rdf:RDF> \n";
+        $return .= "-->  \n";
+
+        return $return;
+    } 
+
+    /**
+     * Search text for links, and searches links for trackback URLs.
+     * 
+     * <code><?php
+     * 
+     * include('trackback_cls.php');
+     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
+     * 
+     * if ($tb_array = $trackback->auto_discovery(string TEXT)) {
+     * 	// Found trackbacks in TEXT. Looping...
+     * 	foreach($tb_array as $tb_key => $tb_url) {
+     * 	// Attempt to ping each one...
+     * 		if ($trackback->ping($tb_url, string URL, [string TITLE], [string EXPERT])) {
+     * 			// Successful ping...
+     * 			echo "Trackback sent to <i>$tb_url</i>...\n";
+     * 		} else {
+     * 			// Error pinging...
+     * 			echo "Trackback to <i>$tb_url</i> failed....\n";
+     * 		}
+     * 	}
+     * } else {
+     * 	// No trackbacks in TEXT...
+     * 	echo "No trackbacks were auto-discover...\n"
+     * }
+     * ?></code>
+     * 
+     * @param string $text 
+     * @return array Trackback URLs.
+     */
+    function auto_discovery($text)
+    { 
+        // Get a list of UNIQUE links from text...
+        // ---------------------------------------
+        // RegExp to look for (0=>link, 4=>host in 'replace')
+        $reg_exp = "/(http)+(s)?:(\\/\\/)((\\w|\\.)+)(\\/)?(\\S+)?/i"; 
+        // Make sure each link ends with [sapce]
+        $text = eregi_replace("www.", "http://www.", $text);
+        $text = eregi_replace("http://http://", "http://", $text);
+        $text = eregi_replace("\"", " \"", $text);
+        $text = eregi_replace("'", " '", $text);
+        $text = eregi_replace(">", " >", $text); 
+        // Create an array with unique links
+        $uri_array = array();
+        if (preg_match_all($reg_exp, strip_tags($text, "<a>"), $array, PREG_PATTERN_ORDER)) {
+            foreach($array[0] as $key => $link) {
+                foreach((array(",", ".", ":", ";")) as $t_key => $t_value) {
+                    $link = trim($link, $t_value);
+                } 
+                $uri_array[] = ($link);
+            } 
+            $uri_array = array_unique($uri_array);
+        } 
+        // Get the trackback URIs from those links...
+        // ------------------------------------------
+        // Loop through the URIs array and extract RDF segments
+        $rdf_array = array(); // <- holds list of RDF segments
+        foreach($uri_array as $key => $link) {
+            if ($link_content = implode("", @file($link))) {
+                preg_match_all('/(<rdf:RDF.*?<\/rdf:RDF>)/sm', $link_content, $link_rdf, PREG_SET_ORDER);
+                for ($i = 0; $i < count($link_rdf); $i++) {
+                    if (preg_match('|dc:identifier="' . preg_quote($link) . '"|ms', $link_rdf[$i][1])) {
+                        $rdf_array[] = trim($link_rdf[$i][1]);
+                    } 
+                } 
+            } 
+        } 
+        // Loop through the RDFs array and extract trackback URIs
+        $tb_array = array(); // <- holds list of trackback URIs
+        if (!empty($rdf_array)) {
+            for ($i = 0; $i < count($rdf_array); $i++) {
+                if (preg_match('/trackback:ping="([^"]+)"/', $rdf_array[$i], $array)) {
+                    $tb_array[] = trim($array[1]);
+                } 
+            } 
+        } 
+        // Return Trackbacks
+        return $tb_array;
+    } 
+
+    /**
+     * Other Useful functions used in this class
+     */
+
+    /**
+     * Converts MySQL datetime to a standart RFC 822 date format
+     * 
+     * @param string $datetime 
+     * @return string RFC 822 date
+     */
+    function RFC822_from_datetime($datetime)
+    {
+        $timestamp = mktime(
+            substr($datetime, 8, 2), substr($datetime, 10, 2), substr($datetime, 12, 2),
+            substr($datetime, 4, 2), substr($datetime, 6, 2), substr($datetime, 0, 4)
+            );
+        return date("r", $timestamp);
+    } 
+
+    /**
+     * Converts a string into an XML-safe string (replaces &, <, >, " and ')
+     * 
+     * @param string $string 
+     * @return string 
+     */
+    function xml_safe($string)
+    {
+        return htmlspecialchars($string, ENT_QUOTES);
+    } 
+
+    /**
+     * Cuts a string short (with "...") accroding to $max_length...
+     * 
+     * @param string $string 
+     * @param integer $max_length 
+     * @return string 
+     */
+    function cut_short($string, $max_length = 255)
+    {
+        if (strlen($string) > $max_length) {
+            $string = substr($string, 0, $max_length) . '...';
+        } 
+
+        return $string;
+    } 
+} 
+
+?>
Index: /trackback/files/lib/util/TrackbackUtil.class.php
===================================================================
--- /trackback/files/lib/util/TrackbackUtil.class.php (revision 1)
+++ /trackback/files/lib/util/TrackbackUtil.class.php (revision 29)
@@ -1,421 +1,60 @@
 <?php
+// Utils
+require_once(WBB_DIR.'lib/util/Trackback.class.php');
 
 /**
- * PHP Class to handle TrackBacks (send/ping, receive, retreive, detect, seed, etc...)
- * 
- * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
- * 
- * @param string $blog_name 
- * @param string $author 
- * @param string $encoding 
+ * trackback util
+ *
+ * @author	Torben Brodt
+ * @package	de.easy-coding.wbb.trackback
+ * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
-class TrackbackUtil {
-    private $blog_name = ''; // Default blog name used throughout the class (ie. BLOGish)
-    private $author = ''; // Default author name used throughout the class (ie. Ran Aroussi)
-    private $encoding = ''; // Default encoding used throughout the class (ie. UTF-8)
-    private $get_id = ''; // Retreives and holds $_GET['id'] (if not empty)
-    private $post_id = ''; // Retreives and holds $_POST['id'] (if not empty)
-    private $url = ''; // Retreives and holds $_POST['url'] (if not empty)
-    private $title = ''; // Retreives and holds $_POST['title'] (if not empty)
-    private $expert = ''; // Retreives and holds $_POST['expert'] (if not empty)
+class TrackbackUtil extends Trackback {
 
-    /**
-     * Class Constructure
-     * 
-     * @param string $blog_name 
-     * @param string $author 
-     * @param string $encoding 
-     * @return 
-     */
-    public function __construct($blog_name, $author, $encoding = "UTF-8")
-    {
-        $this->blog_name = $blog_name;
-        $this->author = $author;
-        $this->encoding = $encoding; 
+	/**
+	 * 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);
+	}
+	
+	/**
+	 * @param postIDs
+	 * @return u
+	 */
+	public 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 (".$postIDs."); ";
+
+		$row = WCF::getDB()->getFirstRow($sql);
+				
+		// build thread url
+		if($row && 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
+			return $rewriter->publicParseThreadURLs($row['threadID'], '');
+		}
+		else if($row) {
+			return sprintf('index.php?page=Thread&threadID=%d', $row['threadID']);
+		}
 		
-        // Gather $_POST information
-        if (isset($_GET['id'])) {
-            $this->get_id = $HTTP_GET_VARS['id'];
-        } 
-        if (isset($_POST['id'])) {
-            $this->post_id = $HTTP_POST_VARS['id'];
-        } 
-        if (isset($_POST['url'])) {
-            $this->url = $HTTP_POST_VARS['url'];
-        } 
-        if (isset($_POST['title'])) {
-            $this->title = $HTTP_POST_VARS['url'];
-        } 
-        if (isset($_POST['expert'])) {
-            $this->expert = $HTTP_POST_VARS['expert'];
-        } 
-    } 
-
-    /**
-     * Sends a trackback ping to a specified trackback URL.
-     * allowing clients to auto-discover the TrackBack Ping URL. 
-     * 
-     * <code><?php
-     * include('trackback_cls.php');
-     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
-     * if ($trackback->ping('http://tracked-blog.com', 'http://your-url.com', 'Your entry title')) {
-     * 	echo "Trackback sent successfully...";
-     * } else {
-     * 	echo "Error sending trackback....";
-     * }
-     * ?></code>
-     * 
-     * @param string $tb 
-     * @param string $url 
-     * @param string $title 
-     * @param string $excerpt 
-     * @return boolean 
-     */
-    public function ping($tb, $url, $title = "", $excerpt = "")
-    {
-        $response = "";
-        $reason = ""; 
-        // Set default values
-        if (empty($title)) {
-            $title = "Trackbacking your entry...";
-        } 
-        if (empty($excerpt)) {
-            $excerpt = "I found your entry interesting do I've added a Trackback to it on my weblog :)";
-        } 
-        // Parse the target
-        $target = parse_url($tb);
-
-        if ((isset($target["query"])) && ($target["query"] != "")) {
-            $target["query"] = "?" . $target["query"];
-        } else {
-            $target["query"] = "";
-        } 
-
-        if ((isset($target["port"]) && !is_numeric($target["port"])) || (!isset($target["port"]))) {
-            $target["port"] = 80;
-        } 
-        // Open the socket
-        $tb_sock = fsockopen($target["host"], $target["port"]); 
-        // Something didn't work out, return
-        if (!is_resource($tb_sock)) {
-            return '$trackback->ping: can\'t connect to: ' . $tb . '.';
-            exit;
-        } 
-        // Put together the things we want to send
-        $tb_send = "url=" . rawurlencode($url) . "&title=" . rawurlencode($title) . "&blog_name=" . rawurlencode($this->blog_name) . "&excerpt=" . rawurlencode($excerpt); 
-        // Send the trackback
-        fputs($tb_sock, "POST " . $target["path"] . $target["query"] . " HTTP/1.1\r\n");
-        fputs($tb_sock, "Host: " . $target["host"] . "\r\n");
-        fputs($tb_sock, "Content-type: application/x-www-form-urlencoded\r\n");
-        fputs($tb_sock, "Content-length: " . strlen($tb_send) . "\r\n");
-        fputs($tb_sock, "Connection: close\r\n\r\n");
-        fputs($tb_sock, $tb_send); 
-        // Gather result
-        while (!feof($tb_sock)) {
-            $response .= fgets($tb_sock, 128);
-        } 
-        // Close socket
-        fclose($tb_sock); 
-        // Did the trackback ping work
-        strpos($response, '<error>0</error>') ? $return = true : $return = false; 
-        // send result
-        return $return;
-    } 
-
-    /**
-     * Produces XML response for trackbackers with ok/error message.
-     * 
-     * <code><?php
-     * // Set page header to XML
-     * header('Content-Type: text/xml'); // MUST be the 1st line
-     * //
-	 * // Instantiate the class
-	 * //
-     * include('trackback_cls.php');
-     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
-	 * //
-     * // Get trackback information
-	 * //
-     * $tb_id = $trackback->post_id; // The id of the item being trackbacked
-     * $tb_url = $trackback->url; // The URL from which we got the trackback
-     * $tb_title = $trackback->title; // Subject/title send by trackback
-     * $tb_expert = $trackback->expert; // Short text send by trackback
-	 * //  
-     * // Do whatever to log the trackback (save in DB, flatfile, etc...)
-	 * //
-     * if (TRACKBACK_LOGGED_SUCCESSFULLY) {
-     * 	// Logged successfully...
-     * 	echo $trackback->recieve(true);
-     * } else {
-     * 	// Something went wrong...
-     * 	echo $trackback->recieve(false, 'Explain why you return error');
-     * }
-     * ?></code>
-     * 
-     * @param boolean $success 
-     * @param string $err_response 
-     * @return boolean 
-     */
-    public function recieve($success = false, $err_response = "")
-    { 
-        // Default error response in case of problems...
-        if (!$success && empty($err_response)) {
-            $err_response = "An error occured while tring to log your trackback...";
-        } 
-        // Start response to trackbacker...
-        $return = '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n";
-        $return .= "<response> \n"; 
-        // Send back response...
-        if ($success) {
-            // Trackback received successfully...
-            $return .= "	<error>0</error> \n";
-        } else {
-            // Something went wrong...
-            $return .= "	<error>1</error> \n";
-            $return .= "	<message>" . $this->xml_safe($err_response) . "</message>\n";
-        } 
-        // End response to trackbacker...
-        $return .= "</response>";
-
-        return $return;
-    } 
-
-    /**
-     * Feteched trackback information and produces an RSS-0.91 feed.
-     * 
-     * <code><?php
-     * // 1
-     * header('Content-Type: text/xml'); // MUST be the 1st line
-     * // 2
-     * include('trackback_cls.php');
-     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
-     * // 3
-     * $tb_id = $trackback->get_id;
-     * // 4
-     * Do whatever to get trackback information by ID (search db, etc...)
-     * if (GOT_TRACKBACK_INFO) {
-     * 	// Successful - pass trackback info as array()...
-     * 	$tb_info = array('title' => string TRACKBACK_TITLE, 
-     * 			'expert'	=> string TRACKBACK_EXPERT,
-     * 			'permalink' => string PERMALINK_URL,
-     * 			'trackback' => string TRACKBACK_URL
-     * 		);
-     * 	echo $trackback->fetch(true, $tb_info);
-     * } else {
-     * 	// Something went wrong - tell my why...
-     * 	echo $trackback->fetch(false, string RESPONSE);
-     * }
-     * ?></code>
-     * 
-     * @param boolean $success 
-     * @param string $response 
-     * @return string XML response to the caller
-     */
-    public function fetch($success = false, $response = "")
-    {
-        if (!$success && empty($response)) {
-            $response = "An error occured while tring to retreive trackback information...";
-        } 
-        // Start response to caller
-        $return = '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n";
-        $return .= "<response> \n"; 
-        // Send back response...
-        if ($success) {
-            // Trackback retreived successfully...
-            // Sending back an RSS (0.91) - trackback information from $response (array)...
-            $return .= "	<error>0</error> \n";
-            $return .= "	<rss version=\"0.91\"> \n";
-            $return .= "	<channel> \n";
-            $return .= "	  <title>" . $this->xml_safe($response['title']) . "</title> \n";
-            $return .= "	  <link>" . $this->xml_safe($response['trackback']) . "</link> \n";
-            $return .= "	  <description>" . $this->xml_safe($response['expert']) . "</description> \n";
-            $return .= "	  <item> \n";
-            $return .= "		<title>" . $this->xml_safe($response['title']) . "</title> \n";
-            $return .= "		<link>" . $this->xml_safe($response['permalink']) . "</link> \n";
-            $return .= "		<description>" . $this->xml_safe($response['expert']) . "</description> \n";
-            $return .= "	  </item> \n";
-            $return .= "	</channel> \n";
-            $return .= "	</rss> \n";
-        } else {
-            // Something went wrong - provide reason from $response (string)...
-            $return .= "	<error>1</error> \n";
-            $return .= "	<message>" . $this->xml_safe($response) . "</message>\n";
-        } 
-        // End response to trackbacker
-        $return .= "</response>";
-
-        return $return;
-    } 
-
-    /**
-     * Produces embedded RDF representing metadata about the entry,
-     * allowing clients to auto-discover the TrackBack Ping URL.
-     * 
-     * NOTE: DATE should be string in RFC822 Format - Use RFC822_from_datetime().
-     * 
-     * <code><?php
-     * include('trackback_cls.php');
-     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
-     * 
-     * echo $trackback->rdf_autodiscover(string DATE, string TITLE, string EXPERT, string PERMALINK, string TRACKBACK [, string AUTHOR]);
-     * ?></code>
-     * 
-     * @param string $RFC822_date 
-     * @param string $title 
-     * @param string $expert 
-     * @param string $permalink 
-     * @param string $trackback 
-     * @param string $author 
-     * @return string 
-     */
-    public function rdf_autodiscover($RFC822_date, $title, $expert, $permalink, $trackback, $author = "")
-    {
-        if (!$author) {
-            $author = $this->author;
-        } 
-
-        $return = "<!-- \n";
-        $return .= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" \n";
-        $return .= "	xmlns:dc=\"http://purl.org/dc/elements/1.1/\" \n";
-        $return .= "	xmlns:trackback=\"http://madskills.com/public/xml/rss/module/trackback/\"> \n";
-        $return .= "<rdf:Description \n";
-        $return .= "	rdf:about=\"" . $this->xml_safe($permalink) . "\" \n";
-        $return .= "	dc:identifier=\"" . $this->xml_safe($permalink) . "\" \n";
-        $return .= "	trackback:ping=\"" . $this->xml_safe($trackback) . "\" \n";
-        $return .= "	dc:title=\"" . $this->xml_safe($title) . "\" \n";
-        $return .= "	dc:subject=\"TrackBack\" \n";
-        $return .= "	dc:description=\"" . $this->xml_safe($this->cut_short($expert)) . "\" \n";
-        $return .= "	dc:creator=\"" . $this->xml_safe($author) . "\" \n";
-        $return .= "	dc:date=\"" . $RFC822_date . "\" /> \n";
-        $return .= "</rdf:RDF> \n";
-        $return .= "-->  \n";
-
-        return $return;
-    } 
-
-    /**
-     * Search text for links, and searches links for trackback URLs.
-     * 
-     * <code><?php
-     * 
-     * include('trackback_cls.php');
-     * $trackback = new Trackback('BLOGish', 'Ran Aroussi', 'UTF-8');
-     * 
-     * if ($tb_array = $trackback->auto_discovery(string TEXT)) {
-     * 	// Found trackbacks in TEXT. Looping...
-     * 	foreach($tb_array as $tb_key => $tb_url) {
-     * 	// Attempt to ping each one...
-     * 		if ($trackback->ping($tb_url, string URL, [string TITLE], [string EXPERT])) {
-     * 			// Successful ping...
-     * 			echo "Trackback sent to <i>$tb_url</i>...\n";
-     * 		} else {
-     * 			// Error pinging...
-     * 			echo "Trackback to <i>$tb_url</i> failed....\n";
-     * 		}
-     * 	}
-     * } else {
-     * 	// No trackbacks in TEXT...
-     * 	echo "No trackbacks were auto-discover...\n"
-     * }
-     * ?></code>
-     * 
-     * @param string $text 
-     * @return array Trackback URLs.
-     */
-    public function auto_discovery($text)
-    { 
-        // Get a list of UNIQUE links from text...
-        // ---------------------------------------
-        // RegExp to look for (0=>link, 4=>host in 'replace')
-        $reg_exp = "/(http)+(s)?:(\\/\\/)((\\w|\\.)+)(\\/)?(\\S+)?/i"; 
-        // Make sure each link ends with [sapce]
-        $text = eregi_replace("www.", "http://www.", $text);
-        $text = eregi_replace("http://http://", "http://", $text);
-        $text = eregi_replace("\"", " \"", $text);
-        $text = eregi_replace("'", " '", $text);
-        $text = eregi_replace(">", " >", $text); 
-        // Create an array with unique links
-        $uri_array = array();
-        if (preg_match_all($reg_exp, strip_tags($text, "<a>"), $array, PREG_PATTERN_ORDER)) {
-            foreach($array[0] as $key => $link) {
-                foreach((array(",", ".", ":", ";")) as $t_key => $t_value) {
-                    $link = trim($link, $t_value);
-                } 
-                $uri_array[] = ($link);
-            } 
-            $uri_array = array_unique($uri_array);
-        } 
-        // Get the trackback URIs from those links...
-        // ------------------------------------------
-        // Loop through the URIs array and extract RDF segments
-        $rdf_array = array(); // <- holds list of RDF segments
-        foreach($uri_array as $key => $link) {
-            if ($link_content = implode("", @file($link))) {
-                preg_match_all('/(<rdf:RDF.*?<\/rdf:RDF>)/sm', $link_content, $link_rdf, PREG_SET_ORDER);
-                for ($i = 0; $i < count($link_rdf); $i++) {
-                    if (preg_match('|dc:identifier="' . preg_quote($link) . '"|ms', $link_rdf[$i][1])) {
-                        $rdf_array[] = trim($link_rdf[$i][1]);
-                    } 
-                } 
-            } 
-        } 
-        // Loop through the RDFs array and extract trackback URIs
-        $tb_array = array(); // <- holds list of trackback URIs
-        if (!empty($rdf_array)) {
-            for ($i = 0; $i < count($rdf_array); $i++) {
-                if (preg_match('/trackback:ping="([^"]+)"/', $rdf_array[$i], $array)) {
-                    $tb_array[] = trim($array[1]);
-                } 
-            } 
-        } 
-        // Return Trackbacks
-        return $tb_array;
-    } 
-
-    /**
-     * Other Useful functions used in this class
-     */
-
-    /**
-     * Converts MySQL datetime to a standart RFC 822 date format
-     * 
-     * @param string $datetime 
-     * @return string RFC 822 date
-     */
-    public function RFC822_from_datetime($datetime)
-    {
-        $timestamp = mktime(
-            substr($datetime, 8, 2), substr($datetime, 10, 2), substr($datetime, 12, 2),
-            substr($datetime, 4, 2), substr($datetime, 6, 2), substr($datetime, 0, 4)
-            );
-        return date("r", $timestamp);
-    } 
-
-    /**
-     * Converts a string into an XML-safe string (replaces &, <, >, " and ')
-     * 
-     * @param string $string 
-     * @return string 
-     */
-    public function xml_safe($string)
-    {
-        return htmlspecialchars($string, ENT_QUOTES);
-    } 
-
-    /**
-     * Cuts a string short (with "...") accroding to $max_length...
-     * 
-     * @param string $string 
-     * @param integer $max_length 
-     * @return string 
-     */
-    public public function cut_short($string, $max_length = 255)
-    {
-        if (strlen($string) > $max_length) {
-            $string = substr($string, 0, $max_length) . '...';
-        } 
-
-        return $string;
-    } 
+		return $row;
+	}
 } 
 
Index: /trackback/install.sql
===================================================================
--- /trackback/install.sql (revision 1)
+++ /trackback/install.sql (revision 29)
@@ -4,4 +4,5 @@
 CREATE TABLE wbb1_1_trackback (
   postID int(10) unsigned NOT NULL,
+  postURL varchar(255) NOT NULL DEFAULT '',
   title varchar(255) NOT NULL DEFAULT '',
   excerpt varchar(255) NOT NULL DEFAULT '',
Index: /trackback/templates.diff
===================================================================
--- /trackback/templates.diff (revision 1)
+++ /trackback/templates.diff (revision 29)
@@ -1,39 +1,9 @@
---- K:/Development/wBB3Mods/original/templates/wbb/thread.tpl	Fri Jun 15 15:44:09 2007
-+++ K:/Development/wBB3Mods/Checkout/wbb3/dev/wbb3mods.wbb.thanksbot/templates_patched/thread.tpl	Sun Jun 17 19:29:35 2007
-@@ -65,6 +65,18 @@
- 	{/if}
- 	<link rel="alternate" type="application/rss+xml" href="index.php?page=Feed&amp;type=RSS2&amp;threadID={@$threadID}" title="RSS2" />
- 	<link rel="alternate" type="application/atom+xml" href="index.php?page=Feed&amp;type=Atom&amp;threadID={@$threadID}" title="Atom" />
-+	<script type="text/javascript">
-+	//<![CDATA[
-+		function showHideThankUser (postID) {
-+			var userDiv = document.getElementById('thankUser-'+postID);
-+			if (userDiv.className == 'hidden') {
-+				userDiv.className = '';
-+			} else {
-+				userDiv.className = 'hidden';
-+			}
-+		}
-+	//]]>
-+	</script>
- </head>
- <body>
- {* --- quick search controls --- *}
-@@ -320,6 +332,10 @@
- 											{if $this->user->userID}
- 												<li><a href="index.php?form=PostReport&amp;postID={@$post->postID}{@SID_ARG_2ND}"><img src="icon/postReportS.png" alt="" /> <span>{lang}wbb.thread.post.button.report{/lang}</span></a></li>
- 											{/if}
-+											{assign var=userID value=$this->user->userID}
-+											{if $this->user->getPermission('user.board.canThank') && $post->hasThank && !$postThanks[$messageID].users[$userID]|isset && $authorID != $this->user->userID}
-+												<li><a href="index.php?action=Thank&amp;postID={@$post->postID}{@SID_ARG_2ND}"><img src="icon/thankS.png" alt="" /> <span>{lang}wbb.thread.post.button.thank{/lang}</span></a></li>
-+											{/if}
- 											{if $post->canEditPost($board, $thread)}
- 												<li><a href="index.php?form=PostEdit&amp;postID={@$post->postID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/editS.png" alt="" /> <span>{lang}wbb.thread.post.button.edit{/lang}</span></a></li>
- 											{/if}
+--- thread.tpl	Fri Jun 15 15:44:09 2007
++++ thread_patched.tpl	Sun Jun 17 19:29:35 2007
 @@ -327,6 +343,7 @@
  									</ul>
  								</div>
  							</div>
-+							{include file="postThankStats"}
++							{include file="postTrackback" sandbox=false}
  							<hr />
  						</div>
Index: /trackback/de.xml
===================================================================
--- /trackback/de.xml (revision 1)
+++ /trackback/de.xml (revision 29)
@@ -3,19 +3,21 @@
 <language languagecode="de">
 	<category name="wcf.acp.group">
-		<item name="wcf.acp.group.option.user.board.canThank"><![CDATA[Kann sich bedanken]]></item>
-		<item name="wcf.acp.group.option.user.board.canThank.description"><![CDATA[Mitglieder dieser Benutzergruppe kÃ¶nnen sich fÃŒr BeitrÃ€ge bedanken.]]></item>
-		<item name="wcf.acp.group.option.user.board.canActivateThank"><![CDATA[Kann Bedankomat aktivieren]]></item>
-		<item name="wcf.acp.group.option.user.board.canActivateThank.description"><![CDATA[Mitglieder dieser Benutzergruppe kÃ¶nnen den Bedankomat fÃŒr BeitrÃ€ge aktivieren.]]></item>
+		<item name="wcf.acp.group.option.user.board.canTrackback"><![CDATA[Kann Trackbacks senden]]></item>
+		<item name="wcf.acp.group.option.user.board.canTrackback.description"><![CDATA[Mitglieder dieser Benutzergruppe kÃ¶nnnen Trackbacks zum automatischen Austausch von Nachrichten und Backlinks erstellen.]]></item>
 	</category>
 	
 	<category name="wbb.thread">
-		<item name="wbb.thread.post.button.thank"><![CDATA[Bedanken]]></item>
-		<item name="wbb.thread.post.thank.stats"><![CDATA[Es {if $postThanks[$messageID].users|isset && $postThanks[$messageID].guests|isset}haben{else}{if $postThanks[$messageID].users|isset}{if $postThanks[$messageID].users|count == 1}hat{else}haben{/if}{/if}{if $postThanks[$messageID].guests|isset}{if $postThanks[$messageID].guests == 1}hat{else}haben{/if}{/if}{/if} sich bereits {if $postThanks[$messageID].users|isset}{@$postThanks[$messageID].users|count} registrierte{if $postThanks[$messageID].users|count == 1}r{/if} Benutzer{if $postThanks[$messageID].guests|isset} und{/if}{/if}{if $postThanks[$messageID].guests|isset} {@$postThanks[$messageID].guests} {if $postThanks[$messageID].guests == 1}Gast{else}GÃ€ste{/if}{/if} bedankt.]]></item>
-		<item name="wbb.thread.post.thank.users"><![CDATA[Benutzer die sich bedankten:]]></item>
+		<item name="wbb.thread.post.trackbacks"><![CDATA[Trackbacks]]></item>
+		<item name="wbb.thread.post.trackback.blog_name"><![CDATA[Blog]]></item>
+		<item name="wbb.thread.post.trackback.title"><![CDATA[Titel]]></item>
+		<item name="wbb.thread.post.trackback.excerpt"><![CDATA[Ausschnitt]]></item>
+		<item name="wbb.thread.post.trackback.url"><![CDATA[URL]]></item>
 	</category>
 	
 	<category name="wbb.threadAdd">
-		<item name="wbb.threadAdd.settings.hastThank"><![CDATA[Bedankomat aktivieren]]></item>
-		<item name="wbb.threadAdd.settings.hastThank.description"><![CDATA[Den Bedankomat fÃŒr diesen Beitrag aktivieren.]]></item>
+		<item name="wbb.threadAdd.settings.hasTrackback"><![CDATA[Trackback aktivieren]]></item>
+		<item name="wbb.threadAdd.settings.hasTrackback.description"><![CDATA[]]></item>
+		<item name="wbb.threadAdd.settings.trackbackUrls"><![CDATA[Trackbacks senden an]]></item>
+		<item name="wbb.threadAdd.settings.trackbackUrls.description"><![CDATA[Mehrere URLs trennen Sie bitte mit einem Zeilenumbruch.]]></item>
 	</category>
 </language>
Index: /trackback/groupoptions.xml
===================================================================
--- /trackback/groupoptions.xml (revision 1)
+++ /trackback/groupoptions.xml (revision 29)
@@ -4,5 +4,4 @@
 	<import>
 		<options>			
-			<!-- user.board.write -->
 			<option name="user.board.canTrackback">
 				<categoryname>user.board.write</categoryname>
@@ -10,5 +9,4 @@
 				<defaultvalue>1</defaultvalue>
 			</option>
-			<!-- /user.board.write -->
 		</options>
 	</import>
Index: /trackback/optionals/de.easy-coding.wcf.data.page.publicseorewriter
===================================================================
--- /trackback/optionals/de.easy-coding.wcf.data.page.publicseorewriter (revision 29)
+++ /trackback/optionals/de.easy-coding.wcf.data.page.publicseorewriter (revision 29)
@@ -0,0 +1,1 @@
+link ../../publicseorewriter/
Index: /trackback/package.xml
===================================================================
--- /trackback/package.xml (revision 5)
+++ /trackback/package.xml (revision 29)
@@ -5,5 +5,5 @@
 		<packagename>Trackback</packagename>
 		<packagedescription>Allow trackback for posts</packagedescription>
-		<version>0.0.1</version>
+		<version>0.0.2</version>
 		<date>DATE</date>
 		<plugin>com.woltlab.wbb</plugin>
@@ -20,4 +20,8 @@
 	</requiredpackages>
 	
+	<optionalpackages>
+		<optionalpackage file="optionals/de.easy-coding.wcf.data.page.publicseorewriter.tar.gz">de.easy-coding.wcf.data.page.publicseorewriter</optionalpackage>
+	</optionalpackages>
+	
 	<instructions type="install">
 		<files>files.tar</files>
Index: /trackback/templates/postTrackbackSetting.tpl
===================================================================
--- /trackback/templates/postTrackbackSetting.tpl (revision 1)
+++ /trackback/templates/postTrackbackSetting.tpl (revision 29)
@@ -1,13 +1,23 @@
 {if $this->user->getPermission('user.board.canTrackback')}
-	<div class="formField">
-		<label><input type="checkbox" name="hasTrackback" value="1" {if $hasTrackback == 1}checked="checked" {/if}/> {lang}wbb.threadAdd.settings.hastTrackback{/lang}</label>
+	<div class="formCheckBox">
+		<div class="formField">
+			<label><input type="checkbox" name="hasTrackback" value="1" {if $hasTrackback == 1}checked="checked" {/if}/> {lang}wbb.threadAdd.settings.hasTrackback{/lang}</label>
+		</div>
+		<div class="formFieldDesc">
+			{lang}wbb.threadAdd.settings.hasTrackback.description{/lang}
+		</div>
 	</div>
-	<div class="formFieldDesc">
-		{lang}wbb.threadAdd.settings.hasTrackback.description{/lang}
-	</div>
-	
-	<div class="formFieldDesc">
-		<label><input type="text" name="trackbackUrls" value="@$trackbackUrls"/> {lang}wbb.threadAdd.settings.hastThank{/lang}<br />
-		{lang}wbb.threadAdd.settings.trackbackUrls.description{/lang}</label>
+
+	<div class="formElement">
+		<div class="formFieldLabel">
+			<label for="trackbackUrls">{lang}wbb.threadAdd.settings.trackbackUrls{/lang}</label>
+		</div>
+
+		<div class="formField">
+			<textarea name="trackbackUrls" id="trackbackUrls" rows="3" cols="20">{@$trackbackUrls}</textarea>
+		</div>
+		<div class="formFieldDesc">
+			<p>{lang}wbb.threadAdd.settings.trackbackUrls.description{/lang}</p>
+		</div>
 	</div>
 {/if}
Index: /trackback/templates/postTrackback.tpl
===================================================================
--- /trackback/templates/postTrackback.tpl (revision 1)
+++ /trackback/templates/postTrackback.tpl (revision 29)
@@ -1,22 +1,8 @@
-{if $thread->hasTrackback}<!--
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
-<rdf:Description rdf:about="http://www.foo.com/archive.html#foo" dc:identifier="http://www.foo.com/archive.html#foo" dc:title="Foo Bar" trackback:ping="http://www.easy-coding.de/index.php?action=Trackback&threadID={@$threadID}" />
-</rdf:RDF>
--->{/if}
-
-{if $postThanks[$messageID]|isset}
-	<div class="thankStats" style="background-color: {@$this->style->getVariable('messages.boxes.background.color')}; color: {@$this->style->getVariable('messages.boxes.font.color')}; border: {@$this->style->getVariable('container.border.outer.width')} {@$this->style->getVariable('container.border.outer.style')} {@$this->style->getVariable('container.border.outer.color')}; clear: both; display: block; margin: 7px 0pt; padding: 7px 15px; positon: relative;">
-		{if $postThanks[$messageID].users|isset}<a href="javascript:void(0);" onclick="showHideThankUser({@$messageID});">{/if}{lang}wbb.thread.post.thank.stats{/lang}{if $postThanks[$messageID].users|isset}</a>{/if}<br />
-		{if $postThanks[$messageID].users|isset}
-			<div id="thankUser-{@$messageID}">
-				<p class="smallFont">{lang}wbb.thread.post.thank.users{/lang}</p>
-				<p class="smallFont">{implode from=$postThanks[$messageID].users item=postThankUsers}<a href="index.php?page=User&amp;userID={@$postThankUsers.userID}{@SID_ARG_2ND}">{@$postThankUsers.username}</a>{/implode}</p>
-			</div>
-			<script type="text/javascript">
-			//<[CDATA[
-				showHideThankUser({@$messageID});
-			//]]>
-			</script>
-		{/if}
-	</div>
+{if $postTrackbacks[$messageID]|isset}
+	{foreach from=$postTrackbacks[$messageID] item=trackback}
+		{lang}wbb.thread.post.trackback.blog_name{/lang}: {$trackback.blog_name}
+		{lang}wbb.thread.post.trackback.title{/lang}: {$trackback.title}<br />
+		{lang}wbb.thread.post.trackback.excerpt{/lang}: {$trackback.excerpt}<br />
+		{lang}wbb.thread.post.trackback.url{/lang}: {$trackback.url}<br />
+        {/foreach}
 {/if}
