############################################################# ## MOD Title: Zeige Beitragstitel statt "Nächstes Thema" ## MOD Author: Nico Haase ## MOD Description: Ersetzt die Links "Nächstes Thema anzeigen" ## und "Vorheriges Thema anzeigen" durch ## Links mit dem Thementitel, die direkt ## zum neuen Thema führen ## ## MOD Version: 0.2 ## ## Installation Level: Easy ## Installation Time: 10 Minutes ## Files To Edit: ## viewtopic.php ## templates/subSilver/viewtopic_body.tpl ## ############################################################## ############################################################## ## ## MOD History: ## ## 2005/01/03 - Version 0.2 ## - $db->sql_freeresult($result); hinzugefügt, ## um Datenbank zu entlasten ## ## 2005/01/02 - Version 0.1 ## - erste Beta ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ ÖFFNEN ]-------------------------------------------------- # # viewtopic.php #-----[ FINDE ]--------------------------------------------------- # // // Post, reply and other URL generation for // templating vars // # #-----[ DANACH EINFÜGEN ]--------------------------------------------------- # $sql = "SELECT t.topic_title, t.topic_id FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2 WHERE t2.topic_id = $topic_id AND t.forum_id = t2.forum_id AND t.topic_last_post_id > t2.topic_last_post_id ORDER BY t.topic_last_post_id ASC LIMIT 1"; if ( !($result = $db->sql_query($sql)) || $db->sql_numrows($result) != 1 ) { $nextTopicText = $lang['No_newer_topics']; $nextTopicLink = '#'; } else { $row = $db->sql_fetchrow($result); $nextTopicText = $row['topic_title']; $nextTopicLink = append_sid("viewtopic.php?t=" . $row['topic_id'] ); } $db->sql_freeresult($result); $sql = "SELECT t.topic_title, t.topic_id FROM " . TOPICS_TABLE . " t, " . TOPICS_TABLE . " t2 WHERE t2.topic_id = $topic_id AND t.forum_id = t2.forum_id AND t.topic_last_post_id < t2.topic_last_post_id ORDER BY t.topic_last_post_id DESC LIMIT 1"; if ( !($result = $db->sql_query($sql)) || $db->sql_numrows($result) != 1 ) { $prevTopicText = $lang['No_older_topics']; $prevTopicLink = '#'; } else { $row = $db->sql_fetchrow($result); $prevTopicText = $row['topic_title']; $prevTopicLink = append_sid("viewtopic.php?t=" . $row['topic_id'] ); } $db->sql_freeresult($result); # #-----[ FINDE ]--------------------------------------------------- # 'L_VIEW_NEXT_TOPIC' => $lang['View_next_topic'], 'L_VIEW_PREVIOUS_TOPIC' => $lang['View_previous_topic'], # #-----[ DANACH EINFÜGEN ]--------------------------------------------------- # 'L_VIEW_NEXT_NAME' => $nextTopicText, 'L_VIEW_PREVIOUS_NAME' => $prevTopicText, # #-----[ FINDE ]--------------------------------------------------- # 'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url, 'U_VIEW_NEWER_TOPIC' => $view_next_topic_url, # #-----[ ERSETZEN DURCH ]------------------------------------------ # 'U_VIEW_OLDER_TOPIC' => $prevTopicLink, 'U_VIEW_NEWER_TOPIC' => $nextTopicLink, ## Die folgende Ersetzung muss in allen templates/*/viewtopic_body.tpl-Dateien ## vorgenommen werden, dabei kann die zu suchende Zeile leicht anders ## aussehen. Achte darauf, dass du bei anderen Templates nicht einfach die ## Zeile per Copy&Paste übernimmst, das könnte dir sonst das Design kaputt- ## reißen! Ggf. einfach im Forum unter www.phpbb.de nachfragen # #-----[ ÖFFNEN ]-------------------------------------------------- # # templates/subSilver/viewtopic_body.tpl #-----[ FINDE ]--------------------------------------------------- # {L_VIEW_PREVIOUS_TOPIC} :: {L_VIEW_NEXT_TOPIC}   # #-----[ IN ZEILE FINDE ]------------------------------------------ # {L_VIEW_PREVIOUS_TOPIC} :: {L_VIEW_NEXT_TOPIC} # #-----[ ERSETZEN DURCH ]------------------------------------------ # {L_VIEW_PREVIOUS_TOPIC}: {L_VIEW_PREVIOUS_NAME}
{L_VIEW_NEXT_TOPIC}: {L_VIEW_NEXT_NAME} ## Das erzeugt die Links mit Umbruch dazwischen. Eine Variante wäre ## {L_VIEW_PREVIOUS_NAME} << {L_VIEW_PREVIOUS_TOPIC} :: {L_VIEW_NEXT_TOPIC} >> {L_VIEW_NEXT_NAME} ## für folgende Ausgabe: ## {Name des vorherigen Themas} << vorheriges Thema anzeigen :: nächstes Thema anzeigen >> {Name des nächsten Themas} # Fertig ;)