Most recent comments

How can I call the most recent comments made on my zenpage articles? Using the zenphoto call <?php printLatestComments(5, 100); ?> just calls the comments that have been made on my photos.

Comments

  • Thanks for answering, and sorry for asking - that was something I totally should have figured out myself, as you had already conveniently supplied the information in the guide.

    I'm having some trouble implementing it, however. This is what I have in the codeblock section:
    <?php
    printLatestZenpageComments( 8, 400, 'showlatestcomments', 'all' )
    ?>
    I've also tried it without the 'all'

    It returns 7 comments (instead of 8) and it doesn't return the most recent ones. For example, the 2 most recent comments were on the same article. For a day or so, neither of them showed up in the latest comments. Now the first one does show up, but the second and latest comment does not.

    I hope that's clear. Can you tell me why this might be happening?
  • acrylian Administrator, Developer
    It should actually do that of course. I will try to reproduce that (I have to admit I don't use comments myself at all...). Were the comments maybe moderated?
  • acrylian Administrator, Developer
    I did a quick test and it seems to work correctly for me.
  • They're not moderated, so they really should all show up. Since it only is returning 7 comments, and I'm asking for 8, it's like the most recent comment is there and just not showing. Very frustrating.
  • acrylian Administrator, Developer
    I am sorry it does work for me. Are you sure that you not expecting an comment of an image/album to be included?
  • No, just comments on articles. Thanks anyway, I appreciate it. It seems like it might be a database problem. If I figure it out, I will post.
  • Hi, I have to say, that it seems to me, that the function "printLatestZenpageComments" for "pages" links wrong, instead with string :page&title=..: with string "news&title=.... You can see it on my pages: http://tourdebier.cz/forum/index.php?p=pages&title=forum where the link links to "add comment" instead to the page "forum". Do I do something wrong?

    My code is:
    <?php
    printLatestZenpageComments( 5, 30, 'showlatestcomments', 'all' );
    ?>

    Thanks! Klimas
  • acrylian Administrator, Developer
    Thanks, will take a look, might be an oversite from times where pages where not intended to have comments.
  • acrylian Administrator, Developer
    Wow, that error must have been there from the beginning of Zenpage! seems that function is not widely used... Anyway, should be fixed in tonight's nightly.
  • THX, in nightbuild works like a charm :)
Sign In or Register to comment.