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: Last 5 comments on my site  (Read 8678 times)

0 Members and 1 Guest are viewing this topic.

lasa

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
    • Fotos.LaSa.nl
Last 5 comments on my site
« on: September 27, 2003, 01:02:28 pm »

I want to display the last 5 comments on my site, not in coppermine.
How can you do that?

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Last 5 comments on my site
« Reply #1 on: September 27, 2003, 02:05:29 pm »

A query like
Code: [Select]
SELECT * FROM `cpg_comments` ORDER BY `msg_date` DESC  LIMIT 0 , 5
Will return the last 5 comments, write a small PHP script to PRINT where ever
Logged
SANIsoft PHP applications for E Biz

lasa

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
    • Fotos.LaSa.nl
Last 5 comments on my site
« Reply #2 on: September 27, 2003, 02:28:42 pm »

Thnx!
But how can I add also a link to that photo?

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Last 5 comments on my site
« Reply #3 on: September 27, 2003, 03:04:26 pm »

Quote from: "lasa"
But how can I add also a link to that photo?

The pid column returned is the picture ID to link to the picture use URL like
http://www.tariquesani.net/displayimage.php?pos=-56

The last number in the above URL is the pid and don't forget the minus sign(-) before the pid number

Of Course link it to your domain not mine ;)
Logged
SANIsoft PHP applications for E Biz

lasa

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
    • Fotos.LaSa.nl
Last 5 comments on my site
« Reply #4 on: September 27, 2003, 03:09:40 pm »

Can you make that small php script for me, please?

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Last 5 comments on my site
« Reply #5 on: September 27, 2003, 03:12:58 pm »

Quote from: "lasa"
Can you make that small php script for me, please?

 :lol:  :lol:  :lol:  :lol: NO!
Logged
SANIsoft PHP applications for E Biz

lasa

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
    • Fotos.LaSa.nl
Last 5 comments on my site
« Reply #6 on: September 27, 2003, 03:16:24 pm »

Grrr... I can't get it how to echo the query... Grrr

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Last 5 comments on my site
« Reply #7 on: September 27, 2003, 05:33:30 pm »

Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Last 5 comments on my site
« Reply #8 on: September 27, 2003, 06:13:48 pm »

Quote from: "gaugau"
take a look at http://prdownloads.sourceforge.net/coppermine/ssi.zip?download

Oh Great! You rescued that one!! :D
Logged
SANIsoft PHP applications for E Biz

lasa

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
    • Fotos.LaSa.nl
Last 5 comments on my site
« Reply #9 on: September 27, 2003, 06:15:05 pm »

Quote from: "tarique"
Quote from: "gaugau"
take a look at http://prdownloads.sourceforge.net/coppermine/ssi.zip?download

Oh Great! You rescued that one!! :D


Even as the FAQ...

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Last 5 comments on my site
« Reply #10 on: September 27, 2003, 06:41:36 pm »

rescuing it was easy - always has been on my hard-drive (I coded it :wink: ). But as I mentioned on the old board: you're not encouraged to use it, as it doesn't give a damn about permissions - it has to be redone (someday).

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 14 queries.