Comment Pagination - Howto?

greetings all you great Zen people,
i have a very important for me question to resolve:
is there any way to do comments pagination? is it difficult?
this would help my design so much since i dont want comments to stretch to infinity..

if there are moders or just good people out there, please help!

Comments

  • there is no answet so far, not doable than??
  • acrylian Administrator, Developer
    Nearly everything is doable, depending on your programming skills. Zenphoto is not setup to do that, so this would mean a lot of work. Is it that worth, do you get that much comments?
  • yes its worth it definatelly and there is a guarantee there will be lots of comments :(

    i really need an idea or even a direction where to start with comment paginations.. is it doable only through php hardcode or database changes/additions required...

    help!
  • acrylian Administrator, Developer
    It should be possible without hacking zenphoto core files. You will need to replace the `next_comment`loop with a custom function. Here are some hints, assuming that you know at least the basics of php:

    You get the comments to the current selected image as an array with `$comments = $_zp_current_image->getComments();`
    Then you have to use a `foreach($comments as $comment) {.....}` loop for example to list the comments. The common functions will not work, so you would have to request the db fields directly with `$currentcomment['comment']` etc.

    Pagination would be of course easier if you get the data directly from the database, then you could use the MySQL offset pointer to separate the results for several pages.
  • akvilon Member
    i thank you very much for the tip and helpful direction,
    appreciate it!
Sign In or Register to comment.