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: a simple code for using the latest images on an HTML page...  (Read 3432 times)

0 Members and 1 Guest are viewing this topic.

alexpalermoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
a simple code for using the latest images on an HTML page...
« on: December 17, 2007, 05:16:26 pm »

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!
« Last Edit: December 17, 2007, 09:57:23 pm by Nibbler »
Logged

alexpalermoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: a simple code for using the latest images on an HTML page...
« Reply #1 on: December 17, 2007, 05:21:18 pm »

nd im not using CMPFetch thingy...just a simple code...
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: a simple code for using the latest images on an HTML page...
« Reply #2 on: December 17, 2007, 05:31:52 pm »

nd im not using CMPFetch thingy...just a simple code...
the you must code it yourself  ;)
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: a simple code for using the latest images on an HTML page...
« Reply #3 on: December 17, 2007, 05:38:49 pm »

Doesn't get simpler than that.
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: a simple code for using the latest images on an HTML page...
« Reply #4 on: December 17, 2007, 06:08:31 pm »

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

« Last Edit: December 17, 2007, 06:14:27 pm by just_some_guy »
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: a simple code for using the latest images on an HTML page...
« Reply #5 on: December 17, 2007, 07:20:30 pm »

what is the CMPFetch?
will it get what i want?
Logged

alexpalermoo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: a simple code for using the latest images on an HTML page...
« Reply #6 on: December 17, 2007, 08:46:02 pm »

I DID IT!!!!! soo thanks for the people who helped!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.