Themensortierung

Probleme bei der regulären Arbeiten mit phpBB, Fragen zu Vorgehensweisen oder Funktionsweise sowie sonstige Fragen zu phpBB im Allgemeinen.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
D1gg3R
Mitglied
Beiträge: 21
Registriert: 04.12.2006 03:52

Themensortierung

Beitrag von D1gg3R »

ich habe die sufu genutzt und leider nichts gefunden

möchte gern meine themen sortierung so machen das er nach datum der erstllung sortiert

also das neuste thema ganz oben auch wenn bei andern themen geantwortet wurde
Benutzeravatar
andreasOymann
Ehemaliges Teammitglied
Beiträge: 2392
Registriert: 10.06.2003 16:29
Wohnort: Hamminkeln
Kontaktdaten:

Beitrag von andreasOymann »

viewforum.php: suche

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 
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
	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, t.topic_last_post_id DESC 
	LIMIT $start, ".$board_config['topics_per_page'];
und ersetze mit

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 
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
	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, t.topic_time DESC 
	LIMIT $start, ".$board_config['topics_per_page'];
A.
Kein Support per PN / Mail / ICQ / MSN ! Dafür gibt´s dieses Forum...
Benutzeravatar
groli91
Mitglied
Beiträge: 535
Registriert: 26.12.2005 23:52
Wohnort: Zürich

Beitrag von groli91 »

und wie mache ich das wen ich das nur in einem speziellen thema will? (also z.B wie hier im newsbereich..)

lg
groli
Grafiken, Banner, etc. sind in Signaturen nicht erlaubt
Suchfunktion macht schlau (Basisintelligenz zur Bedienung vorrausgesetzt) :D
Benutzeravatar
andreasOymann
Ehemaliges Teammitglied
Beiträge: 2392
Registriert: 10.06.2003 16:29
Wohnort: Hamminkeln
Kontaktdaten:

Beitrag von andreasOymann »

Code: Alles auswählen

if ($forum_id == 2) //wenn id 2 der News-Bereich ist
{
$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 
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
	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, t.topic_time DESC 
	LIMIT $start, ".$board_config['topics_per_page'];
}
else
{
$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 
	FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
	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, t.topic_last_post_id DESC 
	LIMIT $start, ".$board_config['topics_per_page'];
}
A.
Kein Support per PN / Mail / ICQ / MSN ! Dafür gibt´s dieses Forum...
Antworten

Zurück zu „phpBB 2.0: Administration, Benutzung und Betrieb“