ich nutze folgendes Script um außerhalb des phpBB auf der Startseite von www.killi.org zufällig generierte Bilder aus Smartor's Photo Album anzeigen zu lassen:
Code: Alles auswählen
<?
$dbhost = '; //set it
$dbname = ''; //set it
$dbuser = ''; //set it
$dbpasswd = ''; //set it
$table_prefix = 'phpbb_'; // perhhaps you have to change ist
$phpbb_root_path = './cgi/phpBB2/'; //set your path
$album_table = $table_prefix.'album';
$dbcon = mysql_connect($dbhost,$dbuser,$dbpasswd);
mysql_select_db($dbname);
?>
<table>
<?php
$sql="SELECT pic_id, pic_title, pic_desc FROM $album_table ORDER BY RAND() LIMIT 1";
$result = mysql_query($sql) or die;
$row = mysql_fetch_array($result);
print "<TR><TD class='klein' align='center'>" . $row['pic_title'] . "<BR></TD></TR><TR><td align='center'><a href='". $phpbb_root_path ."album_page.php?pic_id=" . $row['pic_id'] . "'><img alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.php?pic_id=" . $row['pic_id'] . "'></a></td></TR>";
?>
</table>
Wie kann ich dieses Problem lösen?
Danke und Gruß Martin