Verfasst: 14.06.2005 13:32
kann mir denn dazu niemand ne kleine aussage machen.
wie könnte ich das event datum noch sortieren lassen?
wie könnte ich das event datum noch sortieren lassen?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, c.topic_id, c.cal_interval_units, c.cal_date, c.forum_id, MONTH(c.cal_date) as cal_month, DAYOFWEEK(c.cal_date) as cal_weekday, DAYOFMONTH(c.cal_date) as cal_monthday, YEAR(c.cal_date) as cal_year, DAYNAME(c.cal_date) as cal_day
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . MYCALENDAR_TABLE . " c
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, $sort_method $order_method, t.topic_last_post_id, c.cal_date DESC
LIMIT $start, ".$board_config['topics_per_page'];
Code: Alles auswählen
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, c.topic_id, c.cal_interval_units, c.cal_date, c.forum_id, MONTH(c.cal_date) as cal_month, DAYOFWEEK(c.cal_date) as cal_weekday, DAYOFMONTH(c.cal_date) as cal_monthday, YEAR(c.cal_date) as cal_year, DAYNAME(c.cal_date) as cal_day
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2, " . MYCALENDAR_TABLE . " c
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_id = c.topic_id
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, $sort_method $order_method, t.topic_last_post_id DESC
LIMIT $start, ".$board_config['topics_per_page'];
Acid hat geschrieben:viewforum.php
++FINDE++++MIT FOLGENDEM ERSETZEN++Code: Alles auswählen
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
++FINDE++Code: Alles auswählen
ORDER BY $order_by
++DANACH EINFÜGEN++Code: Alles auswählen
// // Grab all the basic data (all topics except announcements) // for this forum //
..die ForenID musst Du noch angleichen und das rot-markierte Deinen Wünschen anpassen (z.B. nach last post, first post ... sortieren).$order_by = ( $forum_id == 1 ) ? 't.topic_type ASC, t.topic_last_post_id ASC' : 't.topic_type DESC, t.topic_last_post_id DESC';
Das war die erste Frage und danach wurde vom Thema abgewichen.Jan hat geschrieben:Hallo!
Ich möchte die Beiträge von einem meiner Foren nach belieben sortieren. Wie kann ich das anstellen?
Code: Alles auswählen
viewforum.php
++FINDE++
Code:
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
++MIT FOLGENDEM ERSETZEN++
Code:
ORDER BY $order_by
++FINDE++
Code:
//
// Grab all the basic data (all topics except announcements)
// for this forum
//
++DANACH EINFÜGEN++
Zitat:
$order_by = ( $forum_id == 1 ) ? 't.topic_type ASC, t.topic_last_post_id ASC' : 't.topic_type DESC, t.topic_last_post_id DESC';
..die ForenID musst Du noch angleichen und das rot-markierte Deinen Wünschen anpassen (z.B. nach last post, first post ... sortieren).
Hi ...allesweg hat geschrieben:Hallo!
Ich möchte die Beiträge in einem einzigen Unterforum alphabetisch sortieren (oder auch beliebig) allerdings darf sich dabei die Topicnummer (also der Link zum entsprechenden Thema) nicht ändern. Ist das irgendwie machbar?
Lieben Gruß,
Anke