x7chat - Hilfe bei Script anpassen
Verfasst: 19.12.2007 14:07
Hallo
Eigentlich soll mit diesem Script die User , die gerade im Chat sind , im Forum angezeigt werden :
Die Zeilen :
mysql_connect("localhost","username of database","Password for username");
mysql_select_db("your database name");
habe ich geändert in :
mysql_connect("http://MeinForum.de.funpic.de/","MeineD ... QLPasswort");
mysql_select_db("MeineDatenbank");
Eingefügt in die index_body.tpl bekomme ich auf der Forum-Startseite das hier : ( ich befinde mich im Chat )
[ externes Bild ]
Da stimmt also was nicht , aber was ?
Eigentlich soll mit diesem Script die User , die gerade im Chat sind , im Forum angezeigt werden :
Code: Alles auswählen
<html><body><table width='25%'bgcolor="C0C0C0" align=center border=3 valign=top cellpadding=2 cellspacing='0'>
<tr><br><td width='50%' align=center>Im Chat</td><td width='50%' align=center>Raumname</td></tr>
<?
//connect to mysql
//change localhost, username and password to your mySQL username and password
mysql_connect("localhost","username of database","Password for username");
//select which database, change DBname
mysql_select_db("your database name");
//select the table, should be right if you didn't change the prefix in the data base
$result = mysql_query("select * from x7chat2_online");
//grab all the content
while($r=mysql_fetch_array($result))
//modify these to match your mysql table columns that you want to display
$usersonline=$r["name"];
$room=$r["room"];
//display the row
echo "<tr><td width='25%' align=center>$usersonline<br></td><td width='25%' align=center>$room<br>";
?>
</td></tr></table><br></body>
</html>
mysql_connect("localhost","username of database","Password for username");
mysql_select_db("your database name");
habe ich geändert in :
mysql_connect("http://MeinForum.de.funpic.de/","MeineD ... QLPasswort");
mysql_select_db("MeineDatenbank");
Eingefügt in die index_body.tpl bekomme ich auf der Forum-Startseite das hier : ( ich befinde mich im Chat )
[ externes Bild ]
Da stimmt also was nicht , aber was ?