zenphoto forums » Usage Support

Disqus Comment Count Integration

(4 posts)
  • Started 10 months ago by Yannick
  • Latest reply from sbillard
  1. Yannick

    Junior
    Joined: Jun '12
    Posts: 7

    Hello there,

    As my title says, I'm hoping for help integrating Disqus comment count in my news page, so it shows how many comments were made on each news item.

    This probably is quite easy but I can't get it to work.
    The original code looks like this:

    <a href="http://foo.com/bar.html#disqus_thread">Link</a>

    I've tried several modifications like this but I really suck at php. I can't find the function that calls the titlelink in mysql.

    <a href='<?php printNewsTitleLink(); ?>"#disqus_thread">'View Comments</a>

    I hope that one of you can help me!

    Posted 10 months ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    Probably you should review some of the themeing tutorial and the object model. Then you would realize there is a fundamental difference between "get" functions and "print" functions. The latter produces the whole required HTML.

    What you want is <?php echo getNewsURL(getNewsTitleLink()); ?>

    Don't forget to read the Forum rules and usage resources
    Posted 10 months ago #
  3. Yannick

    Junior
    Joined: Jun '12
    Posts: 7

    Thank you sbillard! I've tried "get" too but only tried getNewsTitleLink () without the getNewsUrl before.

    Well I'm still learning. Thanks again, even more since this was obviously a stupid question.

    Posted 10 months ago #
  4. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    Here is another hint. One can always look at the code of the "print" functins to see where they get the items to be printed.

    Don't forget to read the Forum rules and usage resources
    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.