Seite 1 von 1

Wer kann mir helfen mit Recent Topics

Verfasst: 04.02.2003 16:39
von ozzyka
Also mein Problem.

Habe diese Serverstruktur.

Meine Seite, auf der ich auf aktuelle Topics, Posts hinweisen will liegt ganz normal auf index.php.

Mein Forum liegt auf phpBB2/index.php (ganz normal).


Was könnt ihr mir für einen Hack empfehlen und wie kann ich den installieren. Habe mir einen phpbbhacks.com geholt, doch ich schaffe die Installation nicht. Danke für Hilfe.

Re: Wer kann mir helfen mit Recent Topics

Verfasst: 04.02.2003 16:40
von Schumi
ozzyka hat geschrieben:Habe mir einen phpbbhacks.com geholt, doch ich schaffe die Installation nicht.
Sag uns, wo das Problem ist und wir helfen dir!

Verfasst: 04.02.2003 16:57
von ozzyka
Der Installationstext:

########################################################
## 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>";
}
}
?>

#
#-----------------------------------------------
#


Nun kennt ihr ja meine Serverstruktur also was soll ich wie einstellen.

Verfasst: 04.02.2003 17:31
von Guido

Code: Alles auswählen

Your_Server_Path
Das ist der interne Pfad und den hast Du uns nicht verraten...

Verfasst: 05.02.2003 13:57
von ozzyka
was ist das?

Verfasst: 05.02.2003 14:02
von Guido
Na, der interne Serverpfad halt, also da wo Dein Stammverzeichnis ist wo Du z.B. mit einem FTP Prog Deine Daten ablädst, meistens sowas wie:
usr/www/htdocs
Das ist nur ein Beispiel...