Seite 1 von 1

Änderung in "viewforum"

Verfasst: 09.10.2006 22:01
von nickvergessen
Ich würde die Threads gerne Alphabetisch sortieren lassen.
kann mir jemand sagen, was ich da wo, wie umschreiben muss?
oder gibt es da einen Mod dafür?

Verfasst: 09.10.2006 22:45
von MagMo
Hi,

bei Verwendung der Suchfunktion hättest du z.B. mit dem Suchbegriff "alphabetisch" festgestellt, dass das Thema hier schon häufiger behandelt und auch Lösungen gepostet bzw. MODs verlinkt wurden. Eine Lösung gibt es z.B. hier: http://www.phpbb.de/viewtopic.php?t=187 ... phabetisch

Grüße
MagMo

Verfasst: 09.10.2006 23:12
von nickvergessen
ich habs gemacht wie es da steht,
also:
Acid hat geschrieben:viewforum.php

Code: Alles auswählen

ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
++MIT FOLGENDEM ERSETZEN++

Code: Alles auswählen

ORDER BY $order_by

Code: Alles auswählen

// Grab all the basic data (all topics except announcements)
// for this forum
//

Code: Alles auswählen

$order_by = ( $forum_id == 2) ? 't.topic_type ASC, t.topic_topic_title_id ASC' : 't.topic_type DESC, t.topic_topic_title_id DESC';
wobei die Zeile 328 folgendes Schreibt:
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
Also nur die Fehlermeldung

und dann bekomm ich folgendes Problem:
Could not obtain topic information

DEBUG MODE

SQL Error : 1054 Unknown column 't.topic_topic_title_id' in 'order clause'

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 FROM xD_topics t, xD_users u, xD_posts p, xD_posts p2, xD_users u2 WHERE t.forum_id = 2 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 <> 2 ORDER BY t.topic_type ASC, t.topic_topic_title_id ASC LIMIT 0, 50

Line : 328
File : viewforum.php

Verfasst: 09.10.2006 23:22
von MagMo
Hi,
nickvergessen hat geschrieben:

Code: Alles auswählen

$order_by = ( $forum_id == 2) ? 't.topic_type ASC, t.topic_topic_title_id ASC' : 't.topic_type DESC, t.topic_topic_title_id DESC';
Das muss auch einen Fehler geben, da es das Feld "topic_topic_title_id" in der Tabelle nicht gibt.

Probier mal statt dessen folgendes:

Code: Alles auswählen

$order_by = ( $forum_id == 2) ? 't.topic_type DESC, t.topic_title ASC' : 't.topic_type DESC, t.topic_last_post_id DESC';
Damit sollten die Themen im Forum mit der ID 2 alphabetisch sortiert werden. In den anderen Foren bleibt die übliche Reihenfolge bestehen.

Grüße
MagMo

Verfasst: 09.10.2006 23:33
von nickvergessen
jo danke .. jetzt stimmt es ...

kannst closen, da es ja den anderen thread noch gibt *schäm*