Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Recently Added pictures  (Read 2125 times)

0 Members and 1 Guest are viewing this topic.

Caster

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Recently Added pictures
« 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...

Code: [Select]
$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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Recently Added pictures
« Reply #1 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
Logged
Pages: [1]   Go Up
 

Page created in 0.012 seconds with 14 queries.