* @author Christian Weiske * @author Eric Dane * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ // del.icio.us behavior: // - doesn't include the filtered tag as an attribute on the root element (we do) //this page here is really not valid in any way $httpContentType = 'text/html'; // Force HTTP authentication first! require_once 'httpauth.inc.php'; /* Service creation: only useful services are created */ $bookmarkservice = SemanticScuttle_Service_Factory::get('Bookmark'); // Check to see if a tag was specified. if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) { //$_GET vars have + replaced to " " automatically $tag = str_replace(' ', '+', trim($_REQUEST['tag'])); } else { $tag = null; } // Get the posts relevant to the passed-in variables. $bookmarks = $bookmarkservice->getBookmarks( 0, null, $userservice->getCurrentUserId(), $tag, null, getSortOrder() ); // Set up the XML file and output all the posts. echo ''."\r\n"; echo ''; echo ''."\r\n"; echo 'Bookmarks'."\r\n"; echo '

Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."

\r\n"; echo '
'."\r\n"; foreach ($bookmarks['bookmarks'] as $row) { if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) { $description = ''; } else { $description = 'description="'. filter($row['bDescription'], 'xml') .'" '; } $taglist = ''; if (count($row['tags']) > 0) { foreach ($row['tags'] as $tag) { $taglist .= convertTag($tag) .','; } $taglist = substr($taglist, 0, -1); } else { $taglist = 'system:unfiled'; } echo "\t
" . filter($row['bTitle'], 'xml') ."\r\n"; } echo '
'; ?>