a simple code for using the latest images on an HTML page... a simple code for using the latest images on an HTML page...
 

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

a simple code for using the latest images on an HTML page...

Started by alexpalermoo, December 17, 2007, 05:16:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexpalermoo

Hey!
I have been looking everywhere for a code like "http://www.breatheheavy.com"...they have the latest pictures from thier coppermine gallery automatically updated on their non-coppermine gallery page (the index page of the site)...and i need help trying to find the code! thanks!

alexpalermoo


François Keller

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller


just_some_guy

#4

<?php

// MYSQL connect info here 
// Alter `cpg1411` to the table prefix you use
$sql 'SELECT filename,filepath FROM `cpg1411_pictures` ORDER BY ctime DESC LIMIT 10;'
// Alter the number after LIMIT to define the number of pictures you want
$result mysql_query($sql);

while (
$row mysql_fetch_assoc($result)) {
echo 
'<img src="';  
echo 
$row['filepath'];
echo 
$row['filename'];
echo 
'"  />';
}

?>



That will start you off, you may need to alter the code etc. I know this is'nt support for coppermine, but i had a few free minutes.

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

alexpalermoo


alexpalermoo