coppermine-gallery.com/forum

Support => Older/other versions => cpg1.1.X Support (standalone) => Topic started by: lasa on September 27, 2003, 01:02:28 PM

Title: Last 5 comments on my site
Post by: lasa 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?
Title: Last 5 comments on my site
Post by: Tarique Sani on September 27, 2003, 02:05:29 PM
A query like
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
Title: Last 5 comments on my site
Post by: lasa on September 27, 2003, 02:28:42 PM
Thnx!
But how can I add also a link to that photo?
Title: Last 5 comments on my site
Post by: Tarique Sani 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 ;)
Title: Last 5 comments on my site
Post by: lasa on September 27, 2003, 03:09:40 PM
Can you make that small php script for me, please?
Title: Last 5 comments on my site
Post by: Tarique Sani 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!
Title: Last 5 comments on my site
Post by: lasa on September 27, 2003, 03:16:24 PM
Grrr... I can't get it how to echo the query... Grrr
Title: Last 5 comments on my site
Post by: Joachim Müller on September 27, 2003, 05:33:30 PM
take a look at http://prdownloads.sourceforge.net/coppermine/ssi.zip?download

GauGau
Title: Last 5 comments on my site
Post by: Tarique Sani 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
Title: Last 5 comments on my site
Post by: lasa 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...
Title: Last 5 comments on my site
Post by: Joachim Müller 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