zenphoto forums » Zenpage

Comments Text as link

(4 posts)
  1. domc

    Member
    Joined: Mar '08
    Posts: 20

    I would like the make the comments text a link to the main article (title link). Not a php expert although I have made some minor changes to the main template. I would like to have it so that when someone clicks on the Comments text they go to the main article or right to the comments section of the article.

    Anyone have an idea what to change in the index.php of zenpage? For some reason I keep screwing it up putting the href in the wrong place in the code.

    Thanks,
    Dominic
    http://www.photofi.com

    Posted 4 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,359

    Do you mean the comments counter ("Read/Leave Comments: 0")? This should work:
    <?php echo "<a href='".getNewsTitleLink()."'>".gettext("Comments:").getCommentCount()."</a>; ?>

    Don't forget to read the Forum rules and usage resources
    Posted 4 years ago #
  3. domc

    Member
    Joined: Mar '08
    Posts: 20

    Mmm... I'm getting a parse error for the line below:

    Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/html/themes/zenpage/index.php on line 58

    I've tried some variations with no success.

    Thanks,
    Dominic
    http://www.photofi.com

    Posted 4 years ago #
  4. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,359

    I forgot a closing quote: <?php echo "<a href='".getNewsTitleLink()."'>".gettext("Comments:").getCommentCount()."</a>"; ?>

    Don't forget to read the Forum rules and usage resources
    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.