auf der Startseite von www.killi.org habe ich folgendes Skript per include(); eingebunden:
Code: Alles auswählen
<?
define('IN_PHPBB', true);
$phpbb_root_path = './cgi/phpBB2/'; //set the setting correct - I have put the file into album_mod subfolder
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
print "<table align=center>";
print "<tr><th align='center' colspan='3'>zufällige Fotos aus der Fotogalerie</th></tr>"; // make your own text
print "<TR>";
for ($i=0;$i<3;$i++) //set number of pictures for the displayed line
{
$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 "<TD valign='top'><TABLE><TR><TD class='klein' align='center'>" . $row['pic_title'] . "<BR></TD></TR><TR><td align='center'><a href='". append_sid($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></TD>";
}
print "</TR>";
print "</table>";
?>
Danke und Gruß Martin