Letzten Beiträge woanders anzeigen

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
Benutzeravatar
Eclipse16V
Mitglied
Beiträge: 576
Registriert: 27.11.2002 17:04
Wohnort: Gießen
Kontaktdaten:

Letzten Beiträge woanders anzeigen

Beitrag von Eclipse16V »

Habe ein Problem mit dem Mod wo man die letzten Beiträge auf einer anderen .php Seite anzeigen lassen kann. Wenn ich den untenstehenden Code einbaue wird einfach nix angezeigt. Was ist falsch? Kann mir einer helfen?

Hier mal der ganze Code:

Code: Alles auswählen

######################################################## 
## Mod Title:   Recent posts on any page of your server 
## Mod Version: phpBB 2.0 
## Author:       LiLCoolboy (M@urice Cheung) (originally made by ?) 
## Description:  Shows the recent topics or posts on any page of your server 
## 
## DeMo: http://www.xptweakers.cjb.net 
## Installation Level:  Easy 
## Installation Time:   5 minutes 
## Files To Edit:       0 
## Included Files:      (if necessary) 
######################################################## 
## 
## Installation Notes: 
## 
## just put the code in a php file, edit the $serverpath and the $urlpath 
## upload the file and you're all done!!    
## 
######################################################## 

# 
#-----[place the code in a php file]------------------------------------------ 
# 
  <? 

$ServerPath = "Your_Server_Path/config.php";  //- Not Not Include Closing \ Mark! 
$urlPath = "http://Your_Url_Path";  //- Not Not Include Closing \ Mark! 
$PostNumber = "10";  // How Many "X" Posts To Display 
$type = "topics";  // Display "posts" or "topics" 

//-----------------[ DO NOT EDIT BELOW HERE ]------------------------- 

include_once("$ServerPath"); 
$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("here we die at connection"); 
@mysql_select_db("$dbname",$db) or die("here we die"); 

if($type == "phpbb_posts") 
   $sql = "SELECT t.topic_title, t.topic_id, f.forum_id FROM topics t, forums f, posts p WHERE t.topic_id = p.topic_id AND f.forum_id = t.forum_id ORDER BY post_id DESC LIMIT $PostNumber"; 
else 
   $sql = "SELECT t.topic_title, t.topic_id, f.forum_id FROM topics t, forums f WHERE f.forum_id = t.forum_id ORDER BY topic_time DESC LIMIT $PostNumber"; 

if($r = mysql_query($sql, $db)) { 
while($m = mysql_fetch_array($r)) { 
$j = stripslashes($m[topic_title]); 
$k = substr($j, 0, 20) . "..."; 
      echo "-<a title=\"$m[topic_title]\" href=\"$urlpath/viewtopic.php?t=$m[topic_id]&sid=$m[forum_id]\">$k</a><br>"; 
   } 
} 
?> 

# 
#----------------------------------------------- 
#
www.Eclipse16V.de
Erste Eclipse16V IG Deutschlands
Antworten

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