Recently Added pictures Recently Added pictures
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Recently Added pictures

Started by Caster, July 04, 2004, 01:55:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Caster

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?

Joachim Müller

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