coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Caster on July 04, 2004, 01:55:52 AM

Title: Recently Added pictures
Post by: Caster on July 04, 2004, 01:55:52 AM
Hey everyone, I just installed Coppermine Photogallery, and I need it to display the recently added pictures on the front page, but for some reason its not working. This is what I have so far...

$result = mysql_query("SELECT filename,filepath from `cpg11d_pictures` WHERE approved='YES' ORDER BY ctime DESC LIMIT 0,5");

$stringage = "<font face=verdana>";
while($row = mysql_fetch_array($result)){
$filename = $row['filename'];
$stringage .= "<table align=center border=0 cellpadding=0 cellspacing=0 width=180><tr><td bgcolor=#0000000 style=background:url('images/post.jpg');background-repeat;repeat-y; width=180 height=18 valign=top align=center>
<b>$filename</b></td></tr></table></font>";
}
$stringage .= "</font>";


(It has all the other stuff to connect to the DB) It doesn't display anything in the box where I want it to, what should I do?
Title: Re: Recently Added pictures
Post by: Joachim Müller on July 04, 2004, 08:33:03 AM
You might want to take a look into the mod "Random image include" in the mods section of this board and check the code in it. It's not nice code, but it should give you an idea...

GauGau