Bookmark Mod
Verfasst: 22.06.2005 22:07
Hallo!
Ich habe den Bookmark Mod von PhillipK (1.0.4) - funzt auch super,
nur wenn ich die Bookmarks zB. nach Foren sortieren will, dann muss ich sicher in der search.php in dem Teil was hinzufügen:
Nur wie mache ich das am besten, ohne die normale Suche zu beschädigen?
Ich habe den Bookmark Mod von PhillipK (1.0.4) - funzt auch super,
nur wenn ich die Bookmarks zB. nach Foren sortieren will, dann muss ich sicher in der search.php in dem Teil was hinzufügen:
Code: Alles auswählen
else if ( $search_id == 'bookmarks' )
{
if ( $userdata['session_logged_in'] )
{
if ( $auth_sql != '' )
{
$sql = "SELECT t.topic_id, f.forum_id
FROM " . TOPICS_TABLE . " t, " . BOOKMARK_TABLE . " b, " . FORUMS_TABLE . " f
WHERE t.topic_id = b.topic_id
AND t.forum_id = f.forum_id
AND b.user_id = " . $userdata['user_id'] . "
AND $auth_sql";
}
else
{
$sql = "SELECT t.topic_id
FROM " . TOPICS_TABLE . " t, " . BOOKMARK_TABLE . " b
WHERE t.topic_id = b.topic_id
AND b.user_id = " . $userdata['user_id'];
}
}
else
{
redirect(append_sid("login.$phpEx?redirect=search.$phpEx?search_id=bookmarks", true));
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql);
}
$search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$search_ids[] = $row['topic_id'];
}
$db->sql_freeresult($result);
$total_match_count = count($search_ids);
if ($total_match_count <= $start) // No results for the selected page
{
$start = $total_match_count - 1;
$start = intval($start / $board_config['topics_per_page']) * $board_config['topics_per_page'];
}
//
// Basic requirements
//
$show_results = 'bookmarks';
$sort_by = 0;
$sort_dir = 'DESC';