function fetchBrowseFilter($tagid = 0, $view = 'recent')
 {
     // display the filter for browsing ideas
     $code = '';
     if ($tagid == 0) {
         $category = 'All';
         $catStr .= '&nbsp;&nbsp;Category: <a id="ideasViewCategoryAll" class="feedFilterButton selected" href="#" onclick="return false;">All</a>';
     } else {
         require_once PATH_CORE . '/classes/tags.class.php';
         $tagsTable = new tagsTable($this->db);
         $tag = $tagsTable->getRowObject();
         $tag->load($tagid);
         $category = $tag->raw_tag;
         $catStr .= '&nbsp;&nbsp;Category: <a id="ideaViewCategoryAll" class="feedFilterButton" href="#" onclick="ideaResetCategory();return false;">All</a><a id="ideaViewCategoryTopic" class="feedFilterButton selected" href="#" onclick="ideaSetCategory(' . $tagid . ');return false;">' . $category . '</a>';
     }
     $code .= '<div id="navFilter"><input type="hidden" id="filter" value="' . $view . '"><input type="hidden" id="tagid" value="' . $tagid . '"><!-- end navFilter --></div>';
     $code .= '<div class="subFilter">View: ';
     $code .= '<a id="ideaViewNoComment" class="feedFilterButton ' . ($view == 'nocomment' ? 'selected' : '') . '" href="#" onclick="ideaSetView(\'nocomment\');return false;">No comments</a>';
     $code .= '<a id="ideaViewRecent" class="feedFilterButton ' . ($view == 'recent' ? 'selected' : '') . '" href="#" onclick="ideaSetView(\'recent\');return false;">Recent</a>';
     $code .= '<a id="ideaViewPopular" class="feedFilterButton ' . ($view == 'popular' ? 'selected' : '') . '" href="#" onclick="ideaSetView(\'popular\');return false;">Popular</a>';
     if ($this->session->isLoaded) {
         $code .= '<a id="ideaViewFriends" class="feedFilterButton ' . ($view == 'friends' ? 'selected' : '') . '" href="#" onclick="ideaSetView(\'friends\');return false;">Friends</a>';
     } else {
         $code .= '<span id="ideaViewFriends" class="hidden"></span>';
     }
     $code .= '<a id="ideaViewGreatest" class="feedFilterButton ' . ($view == 'greatest' ? 'selected' : '') . '" href="#" onclick="ideaSetView(\'greatest\');return false;">Greatest</a>';
     $code .= $catStr;
     $code .= '</div><!--end "subfilter"-->';
     return $code;
 }
if (defined('ENABLE_IDEAS')) {
    if ($manageObj->modifyLibrary(PATH_FACEBOOK . '/classes/', 'ideas.class.php')) {
        // Ideas Table
        require_once PATH_FACEBOOK . '/classes/ideas.class.php';
        ideasTable::createTable($manageObj);
    }
    $q = $manageObj->db->query("SHOW INDEX FROM Ideas;");
    if ($manageObj->db->countQ($q) == 0) {
        $manageObj->db->query("ALTER TABLE Ideas ADD FULLTEXT INDEX related (idea);");
    }
}
if ($manageObj->modifyLibrary(PATH_CORE . '/classes/', 'tags.class.php')) {
    require_once PATH_CORE . '/classes/tags.class.php';
    TagsTable::createTable($manageObj);
    TaggedObjectsTable::createTable($manageObj);
    $tagsTable = new tagsTable($manageObj->db);
    $tagsTable->initialize();
    // set default tags
    /* deprecated for now
    			// switch to stuff database
    			$manageObj->db->selectDB('stuff');
    			$tagsTable->initializeStuff(); // set default tags		
    			*/
    // return to other database
    $manageObj->db->selectDB($init['database']);
}
/* deprecated for now
		// to do - note: might need to have init tag from array separate
		if (defined('ENABLE_STUFF')) {
			if ($manageObj->modifyLibrary(PATH_FACEBOOK.'/classes/','stuff.class.php')) {		
				// Stuff Tables