last 10 comments last 10 comments
 

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

last 10 comments

Started by lasa, November 15, 2003, 07:43:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lasa

Hi,

How can I display the last 10 comments in text-only on a non-coppermine page? Just on the homepage, so the visitors can see the latest actions, and click on it.

Laurens.

DJMaze

run a SQL query on the cpg_comments table and in that query add "ORDER BY msg_date DESC" then retrieve the first X rows where X is the total you want to show.

example:$sql = "SELECT msg_author, msg_body, msg_date FROM cpg_comments ORDER BY msg_date DESC LIMIT 10";
$result = $db->sql_query($sql);
while ($value = $db->sql_fetchrow($result)) {
    echo $value['msg_body'] . " by " . $value['msg_author] . " on " . $value['msg_date'] . "<br>";
}
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

lasa

Thnx very much, after a little bit modifying, it works now.
Do you know how I can let the comment link to the concerned photo?

Laurens.

Joachim Müller

[list=1]
  • this is a support request, not a feature request; I therefor move this thread to the support board
  • only one issue per thread![/list:o]lasa: you were close to a ban in the past; behave yourself and stick to the rules (post on the right boards etc.)

    GauGau

lasa

1. Sorry for that.
2. I want to expand this feature. So I have to create for every issue of this feature an new topic?
3. Thnx for moving the topic...